linux-2.6-microblaze.git
11 days agoMerge tag 'bcachefs-2025-06-04' of git://evilpiepirate.org/bcachefs
Linus Torvalds [Thu, 5 Jun 2025 02:14:24 +0000 (19:14 -0700)]
Merge tag 'bcachefs-2025-06-04' of git://evilpiepirate.org/bcachefs

Pull more bcachefs updates from Kent Overstreet:
 "More bcachefs updates:

   - More stack usage improvements (~600 bytes)

   - Define CLASS()es for some commonly used types, and convert most
     rcu_read_lock() uses to the new lock guards

   - New introspection:
       - Superblock error counters are now available in sysfs:
         previously, they were only visible with 'show-super', which
         doesn't provide a live view
       - New tracepoint, error_throw(), which is called any time we
         return an error and start to unwind

   - Repair
       - check_fix_ptrs() can now repair btree node roots
       - We can now repair when we've somehow ended up with the journal
         using a superblock bucket

   - Revert some leftovers from the aborted directory i_size feature,
     and add repair code: some userspace programs (e.g. sshfs) were
     getting confused

  It seems in 6.15 there's a bug where i_nlink on the vfs inode has been
  getting incorrectly set to 0, with some unfortunate results;
  list_journal analysis showed bch2_inode_rm() being called (by
  bch2_evict_inode()) when it clearly should not have been.

   - bch2_inode_rm() now runs "should we be deleting this inode?" checks
     that were previously only run when deleting unlinked inodes in
     recovery

   - check_subvol() was treating a dangling subvol (pointing to a
     missing root inode) like a dangling dirent, and deleting it. This
     was the really unfortunate one: check_subvol() will now recreate
     the root inode if necessary

  This took longer to debug than it should have, and we lost several
  filesystems unnecessarily, because users have been ignoring the
  release notes and blindly running 'fsck -y'. Debugging required
  reconstructing what happened through analyzing the journal, when
  ideally someone would have noticed 'hey, fsck is asking me if I want
  to repair this: it usually doesn't, maybe I should run this in dry run
  mode and check what's going on?'

  As a reminder, fsck errors are being marked as autofix once we've
  verified, in real world usage, that they're working correctly; blindly
  running 'fsck -y' on an experimental filesystem is playing with fire

  Up to this incident we've had an excellent track record of not losing
  data, so let's try to learn from this one

  This is a community effort, I wouldn't be able to get this done
  without the help of all the people QAing and providing excellent bug
  reports and feedback based on real world usage. But please don't
  ignore advice and expect me to pick up the pieces

  If an error isn't marked as autofix, and it /is/ happening in the
  wild, that's also something I need to know about so we can check it
  out and add it to the autofix list if repair looks good. I haven't
  been getting those reports, and I should be; since we don't have any
  sort of telemetry yet I am absolutely dependent on user reports

  Now I'll be spending the weekend working on new repair code to see if
  I can get a filesystem back for a user who didn't have backups"

* tag 'bcachefs-2025-06-04' of git://evilpiepirate.org/bcachefs: (69 commits)
  bcachefs: add cond_resched() to handle_overwrites()
  bcachefs: Make journal read log message a bit quieter
  bcachefs: Fix subvol to missing root repair
  bcachefs: Run may_delete_deleted_inode() checks in bch2_inode_rm()
  bcachefs: delete dead code from may_delete_deleted_inode()
  bcachefs: Add flags to subvolume_to_text()
  bcachefs: Fix oops in btree_node_seq_matches()
  bcachefs: Fix dirent_casefold_mismatch repair
  bcachefs: Fix bch2_fsck_rename_dirent() for casefold
  bcachefs: Redo bch2_dirent_init_name()
  bcachefs: Fix -Wc23-extensions in bch2_check_dirents()
  bcachefs: Run check_dirents second time if required
  bcachefs: Run snapshot deletion out of system_long_wq
  bcachefs: Make check_key_has_snapshot safer
  bcachefs: BCH_RECOVERY_PASS_NO_RATELIMIT
  bcachefs: bch2_require_recovery_pass()
  bcachefs: bch_err_throw()
  bcachefs: Repair code for directory i_size
  bcachefs: Kill un-reverted directory i_size code
  bcachefs: Delete redundant fsck_err()
  ...

12 days agobcachefs: add cond_resched() to handle_overwrites()
Kent Overstreet [Tue, 3 Jun 2025 15:47:51 +0000 (11:47 -0400)]
bcachefs: add cond_resched() to handle_overwrites()

Fix soft lockup warnings in btree nodes can.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
12 days agobcachefs: Make journal read log message a bit quieter
Kent Overstreet [Tue, 3 Jun 2025 13:31:58 +0000 (09:31 -0400)]
bcachefs: Make journal read log message a bit quieter

Users seem to be assuming that the 'dropped unflushed entries' message
at the end of journal read indicates some sort of problem, when it does
not - we expect there to be entries in the journal that weren't
commited, it's purely informational so that we can correlate journal
sequence numbers elsewhere when debugging.

Shorten the log message a bit to hopefully make this clearer.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
12 days agobcachefs: Fix subvol to missing root repair
Kent Overstreet [Mon, 2 Jun 2025 23:48:27 +0000 (19:48 -0400)]
bcachefs: Fix subvol to missing root repair

We had a bug where the root inode of a subvolume was erronously deleted:
bch2_evict_inode() called bch2_inode_rm(), meaning the VFS inode's
i_nlink was somehow set to 0 when it shouldn't have - the inode in the
btree indicated it clearly was not unlinked.

This has been addressed with additional safety checks in
bch2_inode_rm() - pulling in the safety checks we already were doing
when deleting unlinked inodes in recovery - but the really disastrous
bug was in check_subvols(), which on finding a dangling subvol (subvol
with a missing root inode) would delete the subvolume.

I assume this bug dates from early check_directory_structure() code,
which originally handled subvolumes and normal paths - the idea being
that still live contents of the subvolume would get reattached
somewhere.

But that's incorrect, and disastrously so; deleting a subvolume triggers
deleting the snapshot ID it points to, deleting the entire contents.

The correct way to repair is to recreate the root inode if it's missing;
then any contents will get reattached under that subvolume's lost+found.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
12 days agobcachefs: Run may_delete_deleted_inode() checks in bch2_inode_rm()
Kent Overstreet [Mon, 2 Jun 2025 21:43:36 +0000 (17:43 -0400)]
bcachefs: Run may_delete_deleted_inode() checks in bch2_inode_rm()

We had a bug where bch2_evict_inode() incorrectly called bch2_inode_rm()
- the journal clearly showed the inode was not unlinked.

We've got checks that we use in recovery when cleaning up deleted
inodes, lift them to bch2_inode_rm() as well.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
12 days agobcachefs: delete dead code from may_delete_deleted_inode()
Kent Overstreet [Mon, 2 Jun 2025 22:26:44 +0000 (18:26 -0400)]
bcachefs: delete dead code from may_delete_deleted_inode()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
12 days agobcachefs: Add flags to subvolume_to_text()
Kent Overstreet [Mon, 2 Jun 2025 21:23:49 +0000 (17:23 -0400)]
bcachefs: Add flags to subvolume_to_text()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
12 days agobcachefs: Fix oops in btree_node_seq_matches()
Kent Overstreet [Mon, 2 Jun 2025 13:26:20 +0000 (09:26 -0400)]
bcachefs: Fix oops in btree_node_seq_matches()

btree_update_nodes_written() needs to wait on in-flight writes to old
nodes before marking them as freed. But it has no reason to pin those
old nodes in memory, so some trickyness ensues.

The update we're completing deleted references to those nodes from the
btree, so we know if they've been evicted they can't be pulled back in.
We just have to check if the nodes we have pointers to are still those
old nodes, and haven't been reused.

To do that we check the node's "sequence number" (actually a random 64
bit cookie), but that lives in the node's data buffer. 'struct btree'
can't be freed until filesystem shutdown (as they're quite small), but
the data buffers can be freed or swapped around.

Commit 1f88c3567495, which was fixing a kmsan warning, assumed that we
could safely do this locklessly with just a READ_ONCE() - if we've got a
non-null ptr it would be safe to read from.

But that's not true if the data buffer is a vmalloc allocation, so we
need to restore the locking that commit deleted (or alternatively RCU
free those data buffers, but there's no other reason for that).

Fixes: 1f88c3567495 ("bcachefs: Fix a KMSAN splat in btree_update_nodes_written()")
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
12 days agobcachefs: Fix dirent_casefold_mismatch repair
Kent Overstreet [Sat, 31 May 2025 04:11:52 +0000 (00:11 -0400)]
bcachefs: Fix dirent_casefold_mismatch repair

Instead of simply recreating a mis-casefolded dirent, use the str_hash
repair code, which will rename it if necessary - the dirent might have
been created again with the correct casefolding.

Factor out out bch2_str_hash_repair key() from
__bch2_str_hash_check_key() for the new path to use, and export
bch2_dirent_create_key() as well.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
12 days agobcachefs: Fix bch2_fsck_rename_dirent() for casefold
Kent Overstreet [Sat, 31 May 2025 21:00:00 +0000 (17:00 -0400)]
bcachefs: Fix bch2_fsck_rename_dirent() for casefold

bch2_fsck_renamed_dirent was creating bch_dirent keys open-coded - but
we need to use the appropriate helper, if the directory is casefolded.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
12 days agobcachefs: Redo bch2_dirent_init_name()
Kent Overstreet [Sun, 1 Jun 2025 22:35:18 +0000 (18:35 -0400)]
bcachefs: Redo bch2_dirent_init_name()

Redo (and simplify somewhat) how casefolded and non casefolded dirents
are initialized, and export this to be used by fsck_rename_dirent().

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
12 days agobcachefs: Fix -Wc23-extensions in bch2_check_dirents()
Nathan Chancellor [Wed, 4 Jun 2025 19:38:27 +0000 (12:38 -0700)]
bcachefs: Fix -Wc23-extensions in bch2_check_dirents()

Clang warns (or errors with CONFIG_WERROR=y):

  fs/bcachefs/fsck.c:2325:2: error: label followed by a declaration is a C23 extension [-Werror,-Wc23-extensions]
   2325 |         int ret = bch2_trans_run(c,
        |         ^

On clang-17 and older, this is an unconditional error:

  fs/bcachefs/fsck.c:2325:2: error: expected expression
   2325 |         int ret = bch2_trans_run(c,
        |         ^

Move the declaration of ret to the top of the function to resolve both
ways this issue manifests.

Fixes: c72def523799 ("bcachefs: Run check_dirents second time if required")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
12 days agoMerge tag 'sched_ext-for-6.16-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 4 Jun 2025 19:07:16 +0000 (12:07 -0700)]
Merge tag 'sched_ext-for-6.16-rc1-fixes' of git://git./linux/kernel/git/tj/sched_ext

Pull sched_ext fixes from Tejun Heo:
 "Two fixes in the built-in idle selection helpers:

   - Fix prev_cpu handling to guarantee that idle selection never
     returns a CPU that's not allowed

   - Skip cross-node search when !NUMA which could lead to infinite
     looping due to a bug in NUMA iterator"

* tag 'sched_ext-for-6.16-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext:
  sched_ext: idle: Skip cross-node search with !CONFIG_NUMA
  sched_ext: idle: Properly handle invalid prev_cpu during idle selection

12 days agoMerge tag 'pci-v6.16-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
Linus Torvalds [Wed, 4 Jun 2025 18:26:17 +0000 (11:26 -0700)]
Merge tag 'pci-v6.16-changes' of git://git./linux/kernel/git/pci/pci

Pull pci updates from Bjorn Helgaas:
 "Enumeration:

   - Print the actual delay time in pci_bridge_wait_for_secondary_bus()
     instead of assuming it was 1000ms (Wilfred Mallawa)

   - Revert 'iommu/amd: Prevent binding other PCI drivers to IOMMU PCI
     devices', which broke resume from system sleep on AMD platforms and
     has been fixed by other commits (Lukas Wunner)

  Resource management:

   - Remove mtip32xx use of pcim_iounmap_regions(), which is deprecated
     and unnecessary (Philipp Stanner)

   - Remove pcim_iounmap_regions() and pcim_request_region_exclusive()
     and related flags since all uses have been removed (Philipp
     Stanner)

   - Rework devres 'request' functions so they are no longer 'hybrid',
     i.e., their behavior no longer depends on whether
     pcim_enable_device or pci_enable_device() was used, and remove
     related code (Philipp Stanner)

   - Warn (not BUG()) about failure to assign optional resources (Ilpo
     Järvinen)

  Error handling:

   - Log the DPC Error Source ID only when it's actually valid (when
     ERR_FATAL or ERR_NONFATAL was received from a downstream device)
     and decode into bus/device/function (Bjorn Helgaas)

   - Determine AER log level once and save it so all related messages
     use the same level (Karolina Stolarek)

   - Use KERN_WARNING, not KERN_ERR, when logging PCIe Correctable
     Errors (Karolina Stolarek)

   - Ratelimit PCIe Correctable and Non-Fatal error logging, with sysfs
     controls on interval and burst count, to avoid flooding logs and
     RCU stall warnings (Jon Pan-Doh)

  Power management:

   - Increment PM usage counter when probing reset methods so we don't
     try to read config space of a powered-off device (Alex Williamson)

   - Set all devices to D0 during enumeration to ensure ACPI opregion is
     connected via _REG (Mario Limonciello)

  Power control:

   - Rename pwrctrl Kconfig symbols from 'PWRCTL' to 'PWRCTRL' to match
     the filename paths. Retain old deprecated symbols for
     compatibility, except for the pwrctrl slot driver
     (PCI_PWRCTRL_SLOT) (Johan Hovold)

   - When unregistering pwrctrl, cancel outstanding rescan work before
     cleaning up data structures to avoid use-after-free issues (Brian
     Norris)

  Bandwidth control:

   - Simplify link bandwidth controller by replacing the count of Link
     Bandwidth Management Status (LBMS) events with a PCI_LINK_LBMS_SEEN
     flag (Ilpo Järvinen)

   - Update the Link Speed after retraining, since the Link Speed may
     have changed (Ilpo Järvinen)

  PCIe native device hotplug:

   - Ignore Presence Detect Changed caused by DPC.

     pciehp already ignores Link Down/Up events caused by DPC, but on
     slots using in-band presence detect, DPC causes a spurious Presence
     Detect Changed event (Lukas Wunner)

   - Ignore Link Down/Up caused by Secondary Bus Reset.

     On hotplug ports using in-band presence detect, the reset causes a
     Presence Detect Changed event, which mistakenly caused teardown and
     re-enumeration of the device. Drivers may need to annotate code
     that resets their device (Lukas Wunner)

  Virtualization:

   - Add an ACS quirk for Loongson Root Ports that don't advertise ACS
     but don't allow peer-to-peer transactions between Root Ports; the
     quirk allows each Root Port to be in a separate IOMMU group (Huacai
     Chen)

  Endpoint framework:

   - For fixed-size BARs, retain both the actual size and the possibly
     larger size allocated to accommodate iATU alignment requirements
     (Jerome Brunet)

   - Simplify ctrl/SPAD space allocation and avoid allocating more space
     than needed (Jerome Brunet)

   - Correct MSI-X PBA offset calculations for DesignWare and Cadence
     endpoint controllers (Niklas Cassel)

   - Align the return value (number of interrupts) encoding for
     pci_epc_get_msi()/pci_epc_ops::get_msi() and
     pci_epc_get_msix()/pci_epc_ops::get_msix() (Niklas Cassel)

   - Align the nr_irqs parameter encoding for
     pci_epc_set_msi()/pci_epc_ops::set_msi() and
     pci_epc_set_msix()/pci_epc_ops::set_msix() (Niklas Cassel)

  Common host controller library:

   - Convert pci-host-common to a library so platforms that don't need
     native host controller drivers don't need to include these helper
     functions (Manivannan Sadhasivam)

  Apple PCIe controller driver:

   - Extract ECAM bridge creation helper from pci_host_common_probe() to
     separate driver-specific things like MSI from PCI things (Marc
     Zyngier)

   - Dynamically allocate RID-to_SID bitmap to prepare for SoCs with
     varying capabilities (Marc Zyngier)

   - Skip ports disabled in DT when setting up ports (Janne Grunau)

   - Add t6020 compatible string (Alyssa Rosenzweig)

   - Add T602x PCIe support (Hector Martin)

   - Directly set/clear INTx mask bits because T602x dropped the
     accessors that could do this without locking (Marc Zyngier)

   - Move port PHY registers to their own reg items to accommodate
     T602x, which moves them around; retain default offsets for existing
     DTs that lack phy%d entries with the reg offsets (Hector Martin)

   - Stop polling for core refclk, which doesn't work on T602x and the
     bootloader has already done anyway (Hector Martin)

   - Use gpiod_set_value_cansleep() when asserting PERST# in probe
     because we're allowed to sleep there (Hector Martin)

  Cadence PCIe controller driver:

   - Drop a runtime PM 'put' to resolve a runtime atomic count underflow
     (Hans Zhang)

   - Make the cadence core buildable as a module (Kishon Vijay Abraham I)

   - Add cdns_pcie_host_disable() and cdns_pcie_ep_disable() for use by
     loadable drivers when they are removed (Siddharth Vadapalli)

  Freescale i.MX6 PCIe controller driver:

   - Apply link training workaround only on IMX6Q, IMX6SX, IMX6SP
     (Richard Zhu)

   - Remove redundant dw_pcie_wait_for_link() from
     imx_pcie_start_link(); since the DWC core does this, imx6 only
     needs it when retraining for a faster link speed (Richard Zhu)

   - Toggle i.MX95 core reset to align with PHY powerup (Richard Zhu)

   - Set SYS_AUX_PWR_DET to work around i.MX95 ERR051624 erratum: in
     some cases, the controller can't exit 'L23 Ready' through Beacon or
     PERST# deassertion (Richard Zhu)

   - Clear GEN3_ZRXDC_NONCOMPL to work around i.MX95 ERR051586 erratum:
     controller can't meet 2.5 GT/s ZRX-DC timing when operating at 8
     GT/s, causing timeouts in L1 (Richard Zhu)

   - Wait for i.MX95 PLL lock before enabling controller (Richard Zhu)

   - Save/restore i.MX95 LUT for suspend/resume (Richard Zhu)

  Mobiveil PCIe controller driver:

   - Return bool (not int) for link-up check in
     mobiveil_pab_ops.link_up() and layerscape-gen4, mobiveil (Hans
     Zhang)

  NVIDIA Tegra194 PCIe controller driver:

   - Create debugfs directory for 'aspm_state_cnt' only when
     CONFIG_PCIEASPM is enabled, since there are no other entries (Hans
     Zhang)

  Qualcomm PCIe controller driver:

   - Add OF support for parsing DT 'eq-presets-<N>gts' property for lane
     equalization presets (Krishna Chaitanya Chundru)

   - Read Maximum Link Width from the Link Capabilities register if DT
     lacks 'num-lanes' property (Krishna Chaitanya Chundru)

   - Add Physical Layer 64 GT/s Capability ID and register offsets for
     8, 32, and 64 GT/s lane equalization registers (Krishna Chaitanya
     Chundru)

   - Add generic dwc support for configuring lane equalization presets
     (Krishna Chaitanya Chundru)

   - Add DT and driver support for PCIe on IPQ5018 SoC (Nitheesh Sekar)

  Renesas R-Car PCIe controller driver:

   - Describe endpoint BAR 4 as being fixed size (Jerome Brunet)

   - Document how to obtain R-Car V4H (r8a779g0) controller firmware
     (Yoshihiro Shimoda)

  Rockchip PCIe controller driver:

   - Reorder rockchip_pci_core_rsts because
     reset_control_bulk_deassert() deasserts in reverse order, to fix a
     link training regression (Jensen Huang)

   - Mark RK3399 as being capable of raising INTx interrupts (Niklas
     Cassel)

  Rockchip DesignWare PCIe controller driver:

   - Check only PCIE_LINKUP, not LTSSM status, to determine whether the
     link is up (Shawn Lin)

   - Increase N_FTS (used in L0s->L0 transitions) and enable ASPM L0s
     for Root Complex and Endpoint modes (Shawn Lin)

   - Hide the broken ATS Capability in rockchip_pcie_ep_init() instead
     of rockchip_pcie_ep_pre_init() so it stays hidden after PERST#
     resets non-sticky registers (Shawn Lin)

   - Call phy_power_off() before phy_exit() in rockchip_pcie_phy_deinit()
     (Diederik de Haas)

  Synopsys DesignWare PCIe controller driver:

   - Set PORT_LOGIC_LINK_WIDTH to one lane to make initial link training
     more robust; this will not affect the intended link width if all
     lanes are functional (Wenbin Yao)

   - Return bool (not int) for link-up check in dw_pcie_ops.link_up()
     and armada8k, dra7xx, dw-rockchip, exynos, histb, keembay,
     keystone, kirin, meson, qcom, qcom-ep, rcar_gen4, spear13xx,
     tegra194, uniphier, visconti (Hans Zhang)

   - Add debugfs support for exposing DWC device-specific PTM context
     (Manivannan Sadhasivam)

  TI J721E PCIe driver:

   - Make j721e buildable as a loadable and removable module (Siddharth
     Vadapalli)

   - Fix j721e host/endpoint dependencies that result in link failures
     in some configs (Arnd Bergmann)

  Device tree bindings:

   - Add qcom DT binding for 'global' interrupt (PCIe controller and
     link-specific events) for ipq8074, ipq8074-gen3, ipq6018, sa8775p,
     sc7280, sc8180x sdm845, sm8150, sm8250, sm8350 (Manivannan
     Sadhasivam)

   - Add qcom DT binding for 8 MSI SPI interrupts for msm8998, ipq8074,
     ipq8074-gen3, ipq6018 (Manivannan Sadhasivam)

   - Add dw rockchip DT binding for rk3576 and rk3562 (Kever Yang)

   - Correct indentation and style of examples in brcm,stb-pcie,
     cdns,cdns-pcie-ep, intel,keembay-pcie-ep, intel,keembay-pcie,
     microchip,pcie-host, rcar-pci-ep, rcar-pci-host, xilinx-versal-cpm
     (Krzysztof Kozlowski)

   - Convert Marvell EBU (dove, kirkwood, armada-370, armada-xp) and
     armada8k from text to schema DT bindings (Rob Herring)

   - Remove obsolete .txt DT bindings for content that has been moved to
     schemas (Rob Herring)

   - Add qcom DT binding for MHI registers in IPQ5332, IPQ6018, IPQ8074
     and IPQ9574 (Varadarajan Narayanan)

   - Convert v3,v360epc-pci from text to DT schema binding (Rob Herring)

   - Change microchip,pcie-host DT binding to be 'dma-noncoherent' since
     PolarFire may be configured that way (Conor Dooley)

  Miscellaneous:

   - Drop 'pci' suffix from intel_mid_pci.c filename to match similar
     files (Andy Shevchenko)

   - All platforms with PCI have an MMU, so add PCI Kconfig dependency
     on MMU to simplify build testing and avoid inadvertent build
     regressions (Arnd Bergmann)

   - Update Krzysztof Wilczyński's email address in MAINTAINERS
     (Krzysztof Wilczyński)

   - Update Manivannan Sadhasivam's email address in MAINTAINERS
     (Manivannan Sadhasivam)"

* tag 'pci-v6.16-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: (147 commits)
  MAINTAINERS: Update Manivannan Sadhasivam email address
  PCI: j721e: Fix host/endpoint dependencies
  PCI: j721e: Add support to build as a loadable module
  PCI: cadence-ep: Introduce cdns_pcie_ep_disable() helper for cleanup
  PCI: cadence-host: Introduce cdns_pcie_host_disable() helper for cleanup
  PCI: cadence: Add support to build pcie-cadence library as a kernel module
  MAINTAINERS: Update Krzysztof Wilczyński email address
  PCI: Remove unnecessary linesplit in __pci_setup_bridge()
  PCI: WARN (not BUG()) when we fail to assign optional resources
  PCI: Remove unused pci_printk()
  PCI: qcom: Replace PERST# sleep time with proper macro
  PCI: dw-rockchip: Replace PERST# sleep time with proper macro
  PCI: host-common: Convert to library for host controller drivers
  PCI/ERR: Remove misleading TODO regarding kernel panic
  PCI: cadence: Remove duplicate message code definitions
  PCI: endpoint: Align pci_epc_set_msix(), pci_epc_ops::set_msix() nr_irqs encoding
  PCI: endpoint: Align pci_epc_set_msi(), pci_epc_ops::set_msi() nr_irqs encoding
  PCI: endpoint: Align pci_epc_get_msix(), pci_epc_ops::get_msix() return value encoding
  PCI: endpoint: Align pci_epc_get_msi(), pci_epc_ops::get_msi() return value encoding
  PCI: cadence-ep: Correct PBA offset in .set_msix() callback
  ...

12 days agoMerge tag 'slab-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka...
Linus Torvalds [Wed, 4 Jun 2025 15:59:59 +0000 (08:59 -0700)]
Merge tag 'slab-for-6.16' of git://git./linux/kernel/git/vbabka/slab

Pull slab updates from Vlastimil Babka:

 - Make kvmalloc() more suitable for callers that need it to succeed,
   but without unnecessary overhead by reclaim and compaction to get a
   physically contiguous allocation.

   Instead fall back to vmalloc() more easily by default, unless
   instructed by __GFP_RETRY_MAYFAIL to prefer kmalloc() harder. This
   should allow the removal of a xfs-specific workaround (Michal Hocko)

 - Remove potentially excessive warnings due to memory pressure when
   allocating structures for per-object allocation profiling metadata
   (Usama Arif)

* tag 'slab-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab:
  mm: slub: only warn once when allocating slab obj extensions fails
  mm: kvmalloc: make kmalloc fast path real fast path

12 days agoMerge tag 'spdx-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Wed, 4 Jun 2025 15:57:22 +0000 (08:57 -0700)]
Merge tag 'spdx-6.16-rc1' of git://git./linux/kernel/git/gregkh/spdx

Pull LICENSES update from Greg KH:
 "Here is a single patch to the LICENSES/ directory to add the CC0
  license that is currently used in the kcpuid x86 tool for one of their
  files.

  This fixes the error that spdxcheck.py currently has with the kcpuid
  file due to a missing LICENSE file for this specific license"

* tag 'spdx-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx:
  LICENSES: add CC0-1.0 license text

12 days agoMerge branch 'pci/misc'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:45 +0000 (10:50 -0500)]
Merge branch 'pci/misc'

- Drop 'pci' suffix from intel_mid_pci.c filename to match similar files
  (Andy Shevchenko)

- All platforms with PCI have an MMU, so add PCI Kconfig dependency on MMU
  to simplify build testing and avoid inadvertent build regressions (Arnd
  Bergmann)

- Update driver path in PCI NVMe function documentation (Rick Wertenbroek)

- Remove unused pci_printk() (Ilpo Järvinen)

- Warn (not BUG()) about failure to assign optional resources (Ilpo
  Järvinen)

- Update Krzysztof Wilczyński's email address in MAINTAINERS (Krzysztof
  Wilczyński)

- Update Manivannan Sadhasivam's email address in MAINTAINERS (Manivannan
  Sadhasivam)

* pci/misc:
  MAINTAINERS: Update Manivannan Sadhasivam email address
  MAINTAINERS: Update Krzysztof Wilczyński email address
  PCI: Remove unnecessary linesplit in __pci_setup_bridge()
  PCI: WARN (not BUG()) when we fail to assign optional resources
  PCI: Remove unused pci_printk()
  Documentation: Fix path for NVMe PCI endpoint target driver
  PCI: Add CONFIG_MMU dependency
  x86/PCI: Drop 'pci' suffix from intel_mid_pci.c

12 days agoMerge branch 'pci/dt-bindings'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:45 +0000 (10:50 -0500)]
Merge branch 'pci/dt-bindings'

- Add qcom DT binding for 'global' interrupt (PCIe controller and
  link-specific events) for ipq8074, ipq8074-gen3, ipq6018, sa8775p,
  sc7280, sc8180x sdm845, sm8150, sm8250, sm8350 (Manivannan Sadhasivam)

- Add qcom DT binding for 8 MSI SPI interrupts for msm8998, ipq8074,
  ipq8074-gen3, ipq6018 (Manivannan Sadhasivam)

- Add dw rockchip DT binding for rk3576 and rk3562 (Kever Yang)

- Correct indentation and style of examples in brcm,stb-pcie,
  cdns,cdns-pcie-ep, intel,keembay-pcie-ep, intel,keembay-pcie,
  microchip,pcie-host, rcar-pci-ep, rcar-pci-host, xilinx-versal-cpm
  (Krzysztof Kozlowski)

- Fix include placement in sifive,fu740-pcie example (Krzysztof Kozlowski)

- Convert Marvell EBU (dove, kirkwood, armada-370, armada-xp) and armada8k
  from text to schema DT bindings (Rob Herring)

- Remove obsolete .txt DT bindings for content that has been moved to
  schemas (Rob Herring)

- Add qcom DT binding for MHI registers in IPQ5332, IPQ6018, IPQ8074 and
  IPQ9574 (Varadarajan Narayanan)

- Convert v3,v360epc-pci from text to DT schema binding (Rob Herring)

- Change microchip,pcie-host DT binding to be 'dma-noncoherent' since
  PolarFire may be configured that way (Conor Dooley)

* pci/dt-bindings:
  dt-bindings: PCI: microchip,pcie-host: Fix DMA coherency property
  dt-bindings: PCI: Convert v3,v360epc-pci to DT schema
  dt-bindings: PCI: qcom: Add MHI registers for IPQ9574
  dt-bindings: PCI: Remove obsolete .txt docs
  dt-bindings: PCI: Convert marvell,armada8k-pcie to schema
  dt-bindings: PCI: Convert Marvell EBU to schema
  dt-bindings: PCI: sifive,fu740-pcie: Fix include placement in DTS example
  dt-bindings: PCI: Correct indentation and style in DTS example
  dt-bindings: PCI: dwc: rockchip: Add rk3562 support
  dt-bindings: PCI: dw: rockchip: Add rk3576 support
  dt-bindings: PCI: qcom,pcie-sc8180x: Add 'global' interrupt
  dt-bindings: PCI: qcom: Allow IPQ6018 to use 8 MSI and one 'global' interrupt
  dt-bindings: PCI: qcom: Allow IPQ8074 to use 8 MSI and one 'global' interrupt
  dt-bindings: PCI: qcom: Allow MSM8998 to use 8 MSI and one 'global' interrupt
  dt-bindings: PCI: qcom: Add 'global' interrupt for SDM845 SoC
  dt-bindings: PCI: qcom,pcie-sc7280: Add 'global' interrupt
  dt-bindings: PCI: qcom,pcie-sa8775p: Add 'global' interrupt
  dt-bindings: PCI: qcom,pcie-sm8350: Add 'global' interrupt
  dt-bindings: PCI: qcom,pcie-sm8250: Add 'global' interrupt
  dt-bindings: PCI: qcom,pcie-sm8150: Add 'global' interrupt

12 days agoMerge branch 'pci/ptm-debugfs'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:44 +0000 (10:50 -0500)]
Merge branch 'pci/ptm-debugfs'

- Add debugfs support for exposing DWC device-specific PTM context
  (Manivannan Sadhasivam)

* pci/ptm-debugfs:
  PCI: qcom-ep: Mask PTM_UPDATING interrupt
  PCI: dwc: Add debugfs support for PTM context
  PCI: dwc: Pass DWC PCIe mode to dwc_pcie_debugfs_init()
  PCI: Add debugfs support for exposing PTM context

12 days agoMerge branch 'pci/controller/tegra194'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:43 +0000 (10:50 -0500)]
Merge branch 'pci/controller/tegra194'

- Create debugfs directory for 'aspm_state_cnt' only when CONFIG_PCIEASPM
  is enabled, since there are no other entries (Hans Zhang)

* pci/controller/tegra194:
  PCI: tegra194: Create debugfs directory only when CONFIG_PCIEASPM is enabled

12 days agoMerge branch 'pci/controller/rockchip'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:43 +0000 (10:50 -0500)]
Merge branch 'pci/controller/rockchip'

- Reorder rockchip_pci_core_rsts because reset_control_bulk_deassert()
  deasserts in reverse order, to fix a link training regression (Jensen
  Huang)

- Mark RK3399 as being capable of raising INTx interrupts (Niklas Cassel)

* pci/controller/rockchip:
  PCI: rockchip-ep: Mark RK3399 as intx_capable
  PCI: rockchip: Fix order of rockchip_pci_core_rsts

12 days agoMerge branch 'pci/controller/rcar-gen4'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:42 +0000 (10:50 -0500)]
Merge branch 'pci/controller/rcar-gen4'

- Describe endpoint BAR 4 as being fixed size (Jerome Brunet)

- Document how to obtain R-Car V4H (r8a779g0) controller firmware
  (Yoshihiro Shimoda)

* pci/controller/rcar-gen4:
  PCI: rcar-gen4: Document how to obtain platform firmware
  PCI: rcar-gen4: set ep BAR4 fixed size

12 days agoMerge branch 'pci/controller/qcom'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:42 +0000 (10:50 -0500)]
Merge branch 'pci/controller/qcom'

- Add OF support for parsing DT 'eq-presets-<N>gts' property for lane
  equalization presets (Krishna Chaitanya Chundru)

- Read Maximum Link Width from the Link Capabilities register if DT lacks
  'num-lanes' property (Krishna Chaitanya Chundru)

- Add Physical Layer 64 GT/s Capability ID and register offsets for 8, 32,
  and 64 GT/s lane equalization registers (Krishna Chaitanya Chundru)

- Add generic dwc support for configuring lane equalization presets
  (Krishna Chaitanya Chundru)

- Add DT and driver support for PCIe on IPQ5018 SoC (Nitheesh Sekar)

* pci/controller/qcom:
  PCI: qcom: Add support for IPQ5018
  dt-bindings: PCI: qcom: Add IPQ5018 SoC
  PCI: dwc: Add support for configuring lane equalization presets
  PCI: Add lane equalization register offsets
  PCI: dwc: Update pci->num_lanes to maximum supported link width
  PCI: of: Add of_pci_get_equalization_presets() API

12 days agoMerge branch 'pci/controller/mvebu'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:41 +0000 (10:50 -0500)]
Merge branch 'pci/controller/mvebu'

- Use for_each_of_range() iterator for parsing 'ranges' (Rob Herring)

* pci/controller/mvebu:
  PCI: mvebu: Use for_each_of_range() iterator for parsing "ranges"

12 days agoMerge branch 'pci/controller/mobiveil'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:41 +0000 (10:50 -0500)]
Merge branch 'pci/controller/mobiveil'

- Use to_delayed_work() instead of open-coding it (Chen Ni)

* pci/controller/mobiveil:
  PCI: ls-gen4: Use to_delayed_work()

12 days agoMerge branch 'pci/controller/imx6'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:40 +0000 (10:50 -0500)]
Merge branch 'pci/controller/imx6'

- Apply link training workaround only on IMX6Q, IMX6SX, IMX6SP (Richard
  Zhu)

- Remove redundant dw_pcie_wait_for_link() from imx_pcie_start_link();
  since the DWC core does this, imx6 only needs it when retraining for a
  faster link speed (Richard Zhu)

- Toggle i.MX95 core reset to align with PHY powerup (Richard Zhu)

- Set SYS_AUX_PWR_DET to work around i.MX95 ERR051624 erratum: in some
  cases, the controller can't exit 'L23 Ready' through Beacon or PERST#
  deassertion (Richard Zhu)

- Clear GEN3_ZRXDC_NONCOMPL to work around i.MX95 ERR051586 erratum:
  controller can't meet 2.5 GT/s ZRX-DC timing when operating at 8 GT/s,
  causing timeouts in L1 (Richard Zhu)

- Wait for i.MX95 PLL lock before enabling controller (Richard Zhu)

- Save/restore i.MX95 LUT for suspend/resume (Richard Zhu)

* pci/controller/imx6:
  PCI: imx6: Save and restore the LUT setting during suspend/resume for i.MX95 SoC
  PCI: imx6: Add PLL lock check for i.MX95 SoC
  PCI: imx6: Add workaround for errata ERR051586
  PCI: imx6: Add workaround for errata ERR051624
  PCI: imx6: Toggle the core reset for i.MX95 PCIe
  PCI: imx6: Call dw_pcie_wait_for_link() from start_link() callback only when required
  PCI: imx6: Skip link up workaround for newer platforms

12 days agoMerge branch 'pci/controller/dwc'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:39 +0000 (10:50 -0500)]
Merge branch 'pci/controller/dwc'

- Set PORT_LOGIC_LINK_WIDTH to one lane to make initial link training more
  robust; this will not affect the intended link width if all lanes are
  functional (Wenbin Yao)

* pci/controller/dwc:
  PCI: dwc: Make link training more robust by setting PORT_LOGIC_LINK_WIDTH to one lane

12 days agoMerge branch 'pci/controller/dwc-ep'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:39 +0000 (10:50 -0500)]
Merge branch 'pci/controller/dwc-ep'

- Use FIELD_GET() to simplify extracting register values (Hans Zhang)

* pci/controller/dwc-ep:
  PCI: dwc: ep: Fix errno typo
  PCI: dwc: ep: Use FIELD_GET() where applicable

12 days agoMerge branch 'pci/controller/dw-rockchip'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:38 +0000 (10:50 -0500)]
Merge branch 'pci/controller/dw-rockchip'

- Check only PCIE_LINKUP, not LTSSM status, to determine whether the link
  is up (Shawn Lin)

- Increase N_FTS (used in L0s->L0 transitions) and enable ASPM L0s for Root
  Complex and Endpoint modes (Shawn Lin)

- Hide the broken ATS Capability in rockchip_pcie_ep_init() instead of
  rockchip_pcie_ep_pre_init() so it stays hidden after PERST# resets
  non-sticky registers (Shawn Lin)

- Remove unused PCIE_CLIENT_GENERAL_DEBUG definition (Hans Zhang)

- Organize register and bitfield definitions logically (Hans Zhang)

- Use rockchip_pcie_link_up() to check link up instead of open coding, and
  use GENMASK() and FIELD_GET() when possible (Hans Zhang)

- Call phy_power_off() before phy_exit() in rockchip_pcie_phy_deinit()
  (Diederik de Haas)

- Return bool (not int) for link-up check in dw_pcie_ops.link_up() and
  armada8k, dra7xx, dw-rockchip, exynos, histb, keembay, keystone, kirin,
  meson, qcom, qcom-ep, rcar_gen4, spear13xx, tegra194, uniphier, visconti
  (Hans Zhang)

- Return bool (not int) for link-up check in mobiveil_pab_ops.link_up() and
  layerscape-gen4, mobiveil (Hans Zhang)

- Simplify j721e link-up check (Hans Zhang)

- Convert pci-host-common to a library so platforms that don't need native
  host controller drivers don't need to include these helper functions
  (Manivannan Sadhasivam)

* pci/controller/dw-rockchip:
  PCI: qcom: Replace PERST# sleep time with proper macro
  PCI: dw-rockchip: Replace PERST# sleep time with proper macro
  PCI: host-common: Convert to library for host controller drivers
  PCI: cadence: Simplify J721e link status check
  PCI: mobiveil: Return bool from link up check
  PCI: dwc: Return bool from link up check
  PCI: dw-rockchip: Fix PHY function call sequence in rockchip_pcie_phy_deinit()
  PCI: dw-rockchip: Use rockchip_pcie_link_up() to check link up instead of open coding
  PCI: dw-rockchip: Reorganize register and bitfield definitions
  PCI: dw-rockchip: Remove unused PCIE_CLIENT_GENERAL_DEBUG definition
  PCI: dw-rockchip: Move rockchip_pcie_ep_hide_broken_ats_cap_rk3588() to dw_pcie_ep_ops::init()
  PCI: dw-rockchip: Enable ASPM L0s capability for both RC and EP modes
  PCI: dw-rockchip: Remove PCIE_L0S_ENTRY check from rockchip_pcie_link_up()

# Conflicts:
# drivers/pci/controller/pcie-apple.c
# include/linux/pci-ecam.h

12 days agoMerge branch 'pci/controller/cadence'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:04 +0000 (10:50 -0500)]
Merge branch 'pci/controller/cadence'

- Drop a runtime PM 'put' to resolve a runtime atomic count underflow (Hans
  Zhang)

- Use shared PCIE_MSG_CODE_* definitions and remove duplicate
  cdns_pcie_msg_code definitions (Hans Zhang)

- Make the cadence core buildable as a module (Kishon Vijay Abraham I)

- Add cdns_pcie_host_disable() and cdns_pcie_ep_disable() for use by
  loadable drivers when they are removed (Siddharth Vadapalli)

- Make j721e buildable as a loadable and removable module (Siddharth
  Vadapalli)

- Fix j721e host/endpoint dependencies that result in link failures in
  some configs (Arnd Bergmann)

* pci/controller/cadence:
  PCI: j721e: Fix host/endpoint dependencies
  PCI: j721e: Add support to build as a loadable module
  PCI: cadence-ep: Introduce cdns_pcie_ep_disable() helper for cleanup
  PCI: cadence-host: Introduce cdns_pcie_host_disable() helper for cleanup
  PCI: cadence: Add support to build pcie-cadence library as a kernel module
  PCI: cadence: Remove duplicate message code definitions
  PCI: cadence: Fix runtime atomic count underflow

12 days agoMerge branch 'pci/controller/apple'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:04 +0000 (10:50 -0500)]
Merge branch 'pci/controller/apple'

- Skip ports disabled in DT when setting up ports (Janne Grunau)

- Add t6020 compatible string (Alyssa Rosenzweig)

- Extract ECAM bridge creation helper from pci_host_common_probe() to
  separate driver-specific things like MSI from PCI things (Marc Zyngier)

- Dynamically allocate RID-to_SID bitmap to prepare for SoCs with varying
  capabilities (Marc Zyngier)

- Directly set/clear INTx mask bits because T602x dropped the accessors
  that could do this without locking (Marc Zyngier)

- Move port PHY registers to their own reg items to accommodate T602x,
  which moves them around; retain default offsets for existing DTs that
  lack phy%d entries with the reg offsets (Hector Martin)

- Stop polling for core refclk, which doesn't work on T602x and the
  bootloader has already done anyway (Hector Martin)

- Use gpiod_set_value_cansleep() when asserting PERST# in probe because
  we're allowed to sleep there (Hector Martin)

- Move register offsets into SoC-specific structure (Hector Martin)

- Add T602x PCIe support (Hector Martin)

* pci/controller/apple:
  PCI: apple: Add T602x PCIe support
  PCI: apple: Abstract register offsets via a SoC-specific structure
  PCI: apple: Use gpiod_set_value_cansleep in probe flow
  PCI: apple: Drop poll for CORE_RC_PHYIF_STAT_REFCLK
  PCI: apple: Move port PHY registers to their own reg items
  PCI: apple: Fix missing OF node reference in apple_pcie_setup_port
  PCI: apple: Move away from INTMSK{SET,CLR} for INTx and private interrupts
  PCI: apple: Dynamically allocate RID-to_SID bitmap
  PCI: apple: Move over to standalone probing
  PCI: ecam: Allow cfg->priv to be pre-populated from the root port device
  PCI: host-generic: Extract an ECAM bridge creation helper from pci_host_common_probe()
  dt-bindings: pci: apple,pcie: Add t6020 compatible string
  PCI: apple: Set only available ports up

12 days agoMerge branch 'pci/endpoint'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:03 +0000 (10:50 -0500)]
Merge branch 'pci/endpoint'

- For fixed-size BARs, retain both the actual size and the possibly larger
  size allocated to accommodate iATU alignment requirements (Jerome Brunet)

- Simplify ctrl/SPAD space allocation and avoid allocating more space than
  needed (Jerome Brunet)

- Correct MSI-X PBA offset calculations for DesignWare and Cadence endpoint
  controllers (Niklas Cassel)

- Align the return value (number of interrupts) encoding for
  pci_epc_get_msi()/pci_epc_ops::get_msi() and
  pci_epc_get_msix()/pci_epc_ops::get_msix() (Niklas Cassel)

- Align the nr_irqs parameter encoding for
  pci_epc_set_msi()/pci_epc_ops::set_msi() and
  pci_epc_set_msix()/pci_epc_ops::set_msix() (Niklas Cassel)

* pci/endpoint:
  PCI: endpoint: Align pci_epc_set_msix(), pci_epc_ops::set_msix() nr_irqs encoding
  PCI: endpoint: Align pci_epc_set_msi(), pci_epc_ops::set_msi() nr_irqs encoding
  PCI: endpoint: Align pci_epc_get_msix(), pci_epc_ops::get_msix() return value encoding
  PCI: endpoint: Align pci_epc_get_msi(), pci_epc_ops::get_msi() return value encoding
  PCI: cadence-ep: Correct PBA offset in .set_msix() callback
  PCI: dwc: ep: Correct PBA offset in .set_msix() callback
  PCI: endpoint: pci-epf-vntb: Simplify ctrl/SPAD space allocation
  PCI: endpoint: Retain fixed-size BAR size as well as aligned size

12 days agoMerge branch 'pci/virtualization'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:03 +0000 (10:50 -0500)]
Merge branch 'pci/virtualization'

- Add an ACS quirk for Loongson Root Ports that don't advertise ACS but
  don't allow peer-to-peer transactions between Root Ports; the quirk
  allows each Root Port to be in a separate IOMMU group (Huacai Chen)

* pci/virtualization:
  PCI: Add ACS quirk for Loongson PCIe

12 days agoMerge branch 'pci/reset'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:02 +0000 (10:50 -0500)]
Merge branch 'pci/reset'

- Fix locking issue in the slot reset path (Ilpo Järvinen)

* pci/reset:
  PCI: Fix lock symmetry in pci_slot_unlock()

12 days agoMerge branch 'pci/pwrctrl'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:02 +0000 (10:50 -0500)]
Merge branch 'pci/pwrctrl'

- Rename pwrctrl Kconfig symbols from 'PWRCTL' to 'PWRCTRL' to match the
  filename paths.  Retain old deprecated symbols for compatibility, except
  for the pwrctrl slot driver (PCI_PWRCTRL_SLOT) (Johan Hovold)

- When unregistering pwrctrl, cancel outstanding rescan work before
  cleaning up data structures to avoid use-after-free issues (Brian Norris)

* pci/pwrctrl:
  arm64: Kconfig: switch to HAVE_PWRCTRL
  wifi: ath12k: switch to PCI_PWRCTRL_PWRSEQ
  wifi: ath11k: switch to PCI_PWRCTRL_PWRSEQ
  PCI/pwrctrl: Rename pwrctrl Kconfig symbols and slot module
  PCI/pwrctrl: Cancel outstanding rescan work when unregistering

12 days agoMerge branch 'pci/pm'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:01 +0000 (10:50 -0500)]
Merge branch 'pci/pm'

- Add pm_runtime_put() cleanup helper for use with __free() to
  automatically drop the device usage count when a pointer goes out of
  scope (Alex Williamson)

- Increment PM usage counter when probing reset methods so we don't try to
  read config space of a powered-off device (Alex Williamson)

- Set all devices to D0 during enumeration to ensure ACPI opregion is
  connected via _REG (Mario Limonciello)

* pci/pm:
  PCI: Explicitly put devices into D0 when initializing
  PCI: Increment PM usage counter when probing reset methods
  PM: runtime: Define pm_runtime_put cleanup helper

12 days agoMerge branch 'pci/pci-acpi'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:00 +0000 (10:50 -0500)]
Merge branch 'pci/pci-acpi'

- Fix pci_acpi_scan_root() memory leak when we fail to create a PCI bus
  (Zhe Qiao)

* pci/pci-acpi:
  PCI/ACPI: Fix allocated memory release on error in pci_acpi_scan_root()

12 days agoMerge branch 'pci/irq'
Bjorn Helgaas [Wed, 4 Jun 2025 15:50:00 +0000 (10:50 -0500)]
Merge branch 'pci/irq'

- Use of_fwnode_handle() so of_node_to_fwnode() can be removed (Jiri Slaby)

* pci/irq:
  irqdomain: pci: Switch to of_fwnode_handle()

12 days agoMerge branch 'pci/hotplug'
Bjorn Helgaas [Wed, 4 Jun 2025 15:49:59 +0000 (10:49 -0500)]
Merge branch 'pci/hotplug'

- Ignore Presence Detect Changed caused by DPC.  pciehp already ignores
  Link Down/Up events caused by DPC, but on slots using in-band presence
  detect, DPC causes a spurious Presence Detect Changed event (Lukas
  Wunner)

- Ignore Link Down/Up caused by Secondary Bus Reset.  On hotplug ports
  using in-band presence detect, the reset causes a Presence Detect Changed
  event, which mistakenly caused teardown and re-enumeration of the device.
  Drivers may need to annotate code that resets their device (Lukas Wunner)

* pci/hotplug:
  PCI: hotplug: Drop superfluous #include directives
  PCI: pciehp: Ignore Link Down/Up caused by Secondary Bus Reset
  PCI: pciehp: Ignore Presence Detect Changed caused by DPC

# Conflicts:
# drivers/pci/pci.h

12 days agoMerge branch 'pci/enumeration'
Bjorn Helgaas [Wed, 4 Jun 2025 15:49:56 +0000 (10:49 -0500)]
Merge branch 'pci/enumeration'

- Remove pci_fixup_cardbus(), which has no users left (Heiner Kallweit)

- Print the actual delay time in pci_bridge_wait_for_secondary_bus()
  instead of assuming it was 1000ms (Wilfred Mallawa)

- Revert 'iommu/amd: Prevent binding other PCI drivers to IOMMU PCI
  devices', which broke resume from system sleep on AMD platforms and has
  been fixed by other commits (Lukas Wunner)

- Restrict visibility of pci_dev.match_driver since it's no longer used
  outside the PCI core (Lukas Wunner)

* pci/enumeration:
  PCI: Limit visibility of match_driver flag to PCI core
  Revert "iommu/amd: Prevent binding other PCI drivers to IOMMU PCI devices"
  PCI: Print the actual delay time in pci_bridge_wait_for_secondary_bus()
  PCI: Use PCI_STD_NUM_BARS instead of 6
  PCI: Remove pci_fixup_cardbus()

# Conflicts:
# drivers/pci/pci.h

12 days agoMerge branch 'pci/devres'
Bjorn Helgaas [Wed, 4 Jun 2025 15:49:50 +0000 (10:49 -0500)]
Merge branch 'pci/devres'

- Remove mtip32xx use of pcim_iounmap_regions(), which is deprecated and
  unnecessary (Philipp Stanner)

- Remove pcim_iounmap_regions() and pcim_request_region_exclusive() and
  related flags since all uses have been removed (Philipp Stanner)

- Rework devres 'request' functions so they are no longer 'hybrid', i.e.,
  their behavior no longer depends on whether pcim_enable_device or
  pci_enable_device() was used, and remove related code (Philipp Stanner)

* pci/devres:
  PCI: Remove function pcim_intx() prototype from pci.h
  PCI: Remove hybrid-devres usage warnings from kernel-doc
  PCI: Remove redundant set of request functions
  PCI: Remove exclusive requests flags from _pcim_request_region()
  PCI: Remove pcim_request_region_exclusive()
  Documentation/driver-api: Update pcim_enable_device()
  PCI: Remove hybrid devres nature from request functions
  PCI: Remove pcim_iounmap_regions()
  mtip32xx: Remove unnecessary pcim_iounmap_regions() calls

12 days agoMerge branch 'pci/bwctrl'
Bjorn Helgaas [Wed, 4 Jun 2025 15:49:49 +0000 (10:49 -0500)]
Merge branch 'pci/bwctrl'

- Simplify link bandwidth controller by replacing the count of Link
  Bandwidth Management Status (LBMS) events with a PCI_LINK_LBMS_SEEN flag
  (Ilpo Järvinen)

- Update the Link Speed after retraining, since the Link Speed may have
  changed (Ilpo Järvinen)

* pci/bwctrl:
  PCI: Update Link Speed after retraining
  PCI/bwctrl: Replace lbms_count with PCI_LINK_LBMS_SEEN flag

12 days agoMerge branch 'pci/aer'
Bjorn Helgaas [Wed, 4 Jun 2025 15:49:49 +0000 (10:49 -0500)]
Merge branch 'pci/aer'

- Initialize struct aer_err_info before using it to avoid depending on
  stack garbage (Bjorn Helgaas)

- Log the DPC Error Source ID only when it's actually valid (when ERR_FATAL
  or ERR_NONFATAL was received from a downstream device) and decode into
  bus/device/function (Bjorn Helgaas)

- Consolidate AER Error Source ID in one place for message consistency
  (Bjorn Helgaas)

- Update statistics and emit trace events early in AER logging paths,
  before any potential ratelimiting (Bjorn Helgaas)

- Determine AER log level once and save it so all related messages use the
  same level (Karolina Stolarek)

- Use KERN_WARNING, not KERN_ERR, when logging PCIe Correctable Errors.

- Ratelimit PCIe Correctable and Non-Fatal error logging, with sysfs
  controls on interval and burst count, to avoid flooding logs and RCU
  stall warnings (Jon Pan-Doh)

* pci/aer:
  PCI/ERR: Remove misleading TODO regarding kernel panic
  PCI/AER: Add sysfs attributes for log ratelimits
  PCI/AER: Add ratelimits to PCI AER Documentation
  PCI/AER: Ratelimit correctable and non-fatal error logging
  PCI/AER: Simplify add_error_device()
  PCI/AER: Convert aer_get_device_error_info(), aer_print_error() to index
  PCI/AER: Rename struct aer_stats to aer_info
  PCI/AER: Reduce pci_print_aer() correctable error level to KERN_WARNING
  PCI/ERR: Add printk level to pcie_print_tlp_log()
  PCI/AER: Check log level once and remember it
  PCI/AER: Trace error event before ratelimiting
  PCI/AER: Update statistics before ratelimiting
  PCI/AER: Simplify pci_print_aer()
  PCI/AER: Initialize aer_err_info before using it
  PCI/AER: Move aer_print_source() earlier in file
  PCI/AER: Rename aer_print_port_info() to aer_print_source()
  PCI/AER: Extract bus/dev/fn in aer_print_port_info() with PCI_BUS_NUM(), etc
  PCI/AER: Consolidate Error Source ID logging in aer_isr_one_error_type()
  PCI/AER: Factor COR/UNCOR error handling out from aer_isr_one_error()
  PCI/DPC: Log Error Source ID only when valid
  PCI/DPC: Initialize aer_err_info before using it

12 days agodrm/ttm: Fix compile error when CONFIG_SHMEM is not set
Steven Rostedt [Wed, 4 Jun 2025 12:51:21 +0000 (08:51 -0400)]
drm/ttm: Fix compile error when CONFIG_SHMEM is not set

When CONFIG_SHMEM is not set, the following compiler error occurs:

  ld: vmlinux.o: in function `ttm_backup_backup_page':
  (.text+0x10363bc): undefined reference to `shmem_writeout'
  make[3]: *** [/work/build/trace/nobackup/linux.git/scripts/Makefile.vmlinux:91: vmlinux.unstripped] Error 1

This is due to the replacement of writepage and calling swap_writeout()
and shmem_writeout() directly.  The issue is that when CONFIG_SHMEM is
not defined, shmem_writeout() is also not defined.

The function ttm_backup_backup_page() called mapping->a_ops->writepage()
which was then changed to call shmem_writeout() directly.

Even before commit 84798514db50 ("mm: Remove swap_writepage() and
shmem_writepage()"), it didn't make sense to call anything other than
shmem_writeout() as the ttm_backup deals only with shmem folios.

Have DRM_TTM config option select SHMEM to guarantee that
shmem_writeout() is available.

Link: https://lore.kernel.org/all/20250602170500.48713a2b@gandalf.local.home/
Suggested-by: Hugh Dickins <hughd@google.com>
Fixes: 84798514db50 ("mm: Remove swap_writepage() and shmem_writepage()")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 days agoMAINTAINERS: Update Manivannan Sadhasivam email address
Manivannan Sadhasivam [Wed, 4 Jun 2025 12:08:30 +0000 (17:38 +0530)]
MAINTAINERS: Update Manivannan Sadhasivam email address

My Linaro email is going to bounce soon, so switch to the kernel.org alias
and add relevant .mailmap entry.

[bhelgaas: squash https://patch.msgid.link/20250604120833.32791-3-manivannan.sadhasivam@linaro.org]
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20250604120833.32791-2-manivannan.sadhasivam@linaro.org
12 days agoMerge tag 'nfs-for-6.16-1' of git://git.linux-nfs.org/projects/anna/linux-nfs
Linus Torvalds [Tue, 3 Jun 2025 23:13:32 +0000 (16:13 -0700)]
Merge tag 'nfs-for-6.16-1' of git://git.linux-nfs.org/projects/anna/linux-nfs

Pull NFS clent updates from Anna Schumaker:
 "New Features:

   - Implement the Sunrpc rfc2203 rpcsec_gss sequence number cache

   - Add support for FALLOC_FL_ZERO_RANGE on NFS v4.2

   - Add a localio sysfs attribute

  Stable Fixes:

   - Fix double-unlock bug in nfs_return_empty_folio()

   - Don't check for OPEN feature support in v4.1

   - Always probe for LOCALIO support asynchronously

   - Prevent hang on NFS mounts with xprtsec=[m]tls

  Other Bugfixes:

   - xattr handlers should check for absent nfs filehandles

   - Fix setattr caching of TIME_[MODIFY|ACCESS]_SET when timestamps are
     delegated

   - Fix listxattr to return selinux security labels

   - Connect to NFSv3 DS using TLS if MDS connection uses TLS

   - Clear SB_RDONLY before getting a superblock, and ignore when
     remounting

   - Fix incorrect handling of NFS error codes in nfs4_do_mkdir()

   - Various nfs_localio fixes from Neil Brown that include fixing an
     rcu compilation error found by older gcc versions.

   - Update stats on flexfiles pNFS DSes when receiving NFS4ERR_DELAY

  Cleanups:

   - Add a refcount tracker for struct net in the nfs_client

   - Allow FREE_STATEID to clean up delegations

   - Always set NLINK even if the server doesn't support it

   - Cleanups to the NFS folio writeback code

   - Remove dead code from xs_tcp_tls_setup_socket()"

* tag 'nfs-for-6.16-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (30 commits)
  flexfiles/pNFS: update stats on NFS4ERR_DELAY for v4.1 DSes
  nfs_localio: change nfsd_file_put_local() to take a pointer to __rcu pointer
  nfs_localio: protect race between nfs_uuid_put() and nfs_close_local_fh()
  nfs_localio: duplicate nfs_close_local_fh()
  nfs_localio: simplify interface to nfsd for getting nfsd_file
  nfs_localio: always hold nfsd net ref with nfsd_file ref
  nfs_localio: use cmpxchg() to install new nfs_file_localio
  SUNRPC: Remove dead code from xs_tcp_tls_setup_socket()
  SUNRPC: Prevent hang on NFS mount with xprtsec=[m]tls
  nfs: fix incorrect handling of large-number NFS errors in nfs4_do_mkdir()
  nfs: ignore SB_RDONLY when remounting nfs
  nfs: clear SB_RDONLY before getting superblock
  NFS: always probe for LOCALIO support asynchronously
  pnfs/flexfiles: connect to NFSv3 DS using TLS if MDS connection uses TLS
  NFS: add localio to sysfs
  nfs: use writeback_iter directly
  nfs: refactor nfs_do_writepage
  nfs: don't return AOP_WRITEPAGE_ACTIVATE from nfs_do_writepage
  nfs: fold nfs_page_async_flush into nfs_do_writepage
  NFSv4: Always set NLINK even if the server doesn't support it
  ...

12 days agoMerge tag 'v6.16-rc-part1-smb-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Tue, 3 Jun 2025 23:04:29 +0000 (16:04 -0700)]
Merge tag 'v6.16-rc-part1-smb-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client updates from Steve French:

 - multichannel fixes (mostly reconnect related), and clarification of
   locking documentation

 - automount null pointer check fix

 - fixes to add support for ParentLeaseKey

 - minor cleanup

 - smb1/cifs fixes

* tag 'v6.16-rc-part1-smb-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: update the lock ordering comments with new mutex
  cifs: dns resolution is needed only for primary channel
  cifs: update dstaddr whenever channel iface is updated
  cifs: reset connections for all channels when reconnect requested
  smb: client: use ParentLeaseKey in cifs_do_create
  smb: client: use ParentLeaseKey in open_cached_dir
  smb: client: add ParentLeaseKey support
  cifs: Fix cifs_query_path_info() for Windows NT servers
  cifs: Fix validation of SMB1 query reparse point response
  cifs: Correctly set SMB1 SessionKey field in Session Setup Request
  cifs: Fix encoding of SMB1 Session Setup NTLMSSP Request in non-UNICODE mode
  smb: client: add NULL check in automount_fullpath
  smb: client: Remove an unused function and variable

12 days agoMerge tag 'for-6.16/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 3 Jun 2025 22:54:46 +0000 (15:54 -0700)]
Merge tag 'for-6.16/dm-changes' of git://git./linux/kernel/git/device-mapper/linux-dm

Pull device mapper updates from Mikulas Patocka:

 - better error handling when reloading a table

 - use use generic disable_* functions instead of open coding them

 - lock queue limits when reading them

 - remove unneeded kvfree from alloc_targets

 - fix BLK_FEAT_ATOMIC_WRITES

 - pass through operations on wrapped inline crypto keys

 - dm-verity:
     - use softirq context only when !need_resched()
     - fix a memory leak if some arguments are specified multiple times

 - dm-mpath:
    - interface for explicit probing of active paths
    - replace spin_lock_irqsave with spin_lock_irq

 - dm-delay: don't busy-wait in kthread

 - dm-bufio: remove maximum age based eviction

 - dm-flakey: various fixes

 - vdo indexer: don't read request structure after enqueuing

 - dm-zone: Use bdev_*() helper functions where applicable

 - dm-mirror: fix a tiny race condition

 - dm-stripe: small code cleanup

* tag 'for-6.16/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (29 commits)
  dm-stripe: small code cleanup
  dm-verity: fix a memory leak if some arguments are specified multiple times
  dm-mirror: fix a tiny race condition
  dm-table: check BLK_FEAT_ATOMIC_WRITES inside limits_lock
  dm mpath: replace spin_lock_irqsave with spin_lock_irq
  dm-mpath: Don't grab work_mutex while probing paths
  dm-zone: Use bdev_*() helper functions where applicable
  dm vdo indexer: don't read request structure after enqueuing
  dm: pass through operations on wrapped inline crypto keys
  blk-crypto: export wrapped key functions
  dm-table: Set BLK_FEAT_ATOMIC_WRITES for target queue limits
  dm mpath: Interface for explicit probing of active paths
  dm: Allow .prepare_ioctl to handle ioctls directly
  dm-flakey: make corrupting read bios work
  dm-flakey: remove useless ERROR_READS check in flakey_end_io
  dm-flakey: error all IOs when num_features is absent
  dm-flakey: Clean up parsing messages
  dm: remove unneeded kvfree from alloc_targets
  dm-bufio: remove maximum age based eviction
  dm-verity: use softirq context only when !need_resched()
  ...

12 days agoMerge tag 'perf-tools-for-v6.16-1-2025-06-03' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Tue, 3 Jun 2025 22:11:44 +0000 (15:11 -0700)]
Merge tag 'perf-tools-for-v6.16-1-2025-06-03' of git://git./linux/kernel/git/perf/perf-tools

Pull perf tools updates from Arnaldo Carvalho de Melo:
 "perf report/top/annotate TUI:

   - Accept the left arrow key as a Zoom out if done on the first column

   - Show if source code toggle status in title, to help spotting bugs
     with the various disassemblers (capstone, llvm, objdump)

   - Provide feedback on unhandled hotkeys

  Build:

   - Better inform when certain features are not available with warnings
     in the build process and in 'perf version --build-options' or 'perf -vv'

  perf record:

   - Improve the --off-cpu code by synthesizing events for switch-out ->
     switch-in intervals using a BPF program. This can be fine tuned
     using a --off-cpu-thresh knob

  perf report:

   - Add 'tgid' sort key

  perf mem/c2c:

   - Add 'op', 'cache', 'snoop', 'dtlb' output fields

   - Add support for 'ldlat' on AMD IBS (Instruction Based Sampling)

  perf ftrace:

   - Use process/session specific trace settings instead of messing with
     the global ftrace knobs

  perf trace:

   - Implement syscall summary in BPF

   - Support --summary-mode=cgroup

   - Always print return value for syscalls returning a pid

   - The rseq and set_robust_list don't return a pid, just -errno

  perf lock contention:

   - Symbolize zone->lock using BTF

   - Add -J/--inject-delay option to estimate impact on application
     performance by optimization of kernel locking behavior

  perf stat:

   - Improve hybrid support for the NMI watchdog warning

  Symbol resolution:

   - Handle 'u' and 'l' symbols in /proc/kallsyms, resolving some Rust
     symbols

   - Improve Rust demangler

  Hardware tracing:

  Intel PT:

   - Fix PEBS-via-PT data_src

   - Do not default to recording all switch events

   - Fix pattern matching with python3 on the SQL viewer script

  arm64:

   - Fixups for the hip08 hha PMU

  Vendor events:

   - Update Intel events/metrics files for alderlake, alderlaken,
     arrowlake, bonnell, broadwell, broadwellde, broadwellx,
     cascadelakex, clearwaterforest, elkhartlake, emeraldrapids,
     grandridge, graniterapids, haswell, haswellx, icelake, icelakex,
     ivybridge, ivytown, jaketown, lunarlake, meteorlake, nehalemep,
     nehalemex, rocketlake, sandybridge, sapphirerapids, sierraforest,
     skylake, skylakex, snowridgex, tigerlake, westmereep-dp,
     westmereep-sp, westmereep-sx

  python support:

   - Add support for event counts in the python binding, add a
     counting.py example

  perf list:

   - Display the PMU name associated with a perf metric in JSON

  perf test:

   - Hybrid improvements for metric value validation test

   - Fix LBR test by ignoring idle task

   - Add AMD IBS sw filter ana d'ldlat' tests

   - Add 'perf trace --summary-mode=cgroup' test

   - Add tests for the various language symbol demanglers

  Miscellaneous:

   - Allow specifying the cpu an event will be tied using '-e
     event/cpu=N/'

   - Sync various headers with the kernel sources

   - Add annotations to use clang's -Wthread-safety and fix some
     problems it detected

   - Make dump_stack() use perf's symbol resolution to provide better
     backtraces

   - Intel TPEBS support cleanups and fixes. TPEBS stands for Timed PEBS
     (Precision Event-Based Sampling), that adds timing info, the
     retirement latency of instructions

   - Various memory allocation (some detected by ASAN) and reference
     counting fixes

   - Add a 8-byte aligned PERF_RECORD_COMPRESSED2 to replace
     PERF_RECORD_COMPRESSED

   - Skip unsupported event types in perf.data files, don't stop when
     finding one

   - Improve lookups using hashmaps and binary searches"

* tag 'perf-tools-for-v6.16-1-2025-06-03' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: (206 commits)
  perf callchain: Always populate the addr_location map when adding IP
  perf lock contention: Reject more than 10ms delays for safety
  perf trace: Set errpid to false for rseq and set_robust_list
  perf symbol: Move demangling code out of symbol-elf.c
  perf trace: Always print return value for syscalls returning a pid
  perf script: Print PERF_AUX_FLAG_COLLISION flag
  perf mem: Show absolute percent in mem_stat output
  perf mem: Display sort order only if it's available
  perf mem: Describe overhead calculation in brief
  perf record: Fix incorrect --user-regs comments
  Revert "perf thread: Ensure comm_lock held for comm_list"
  perf test trace_summary: Skip --bpf-summary tests if no libbpf
  perf test intel-pt: Skip jitdump test if no libelf
  perf intel-tpebs: Avoid race when evlist is being deleted
  perf test demangle-java: Don't segv if demangling fails
  perf symbol: Fix use-after-free in filename__read_build_id
  perf pmu: Avoid segv for missing name/alias_name in wildcarding
  perf machine: Factor creating a "live" machine out of dwarf-unwind
  perf test: Add AMD IBS sw filter test
  perf mem: Count L2 HITM for c2c statistic
  ...

12 days agoMerge tag 'trace-v6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
Linus Torvalds [Tue, 3 Jun 2025 21:21:31 +0000 (14:21 -0700)]
Merge tag 'trace-v6.16-2' of git://git./linux/kernel/git/trace/linux-trace

Pull tracing fixes from Steven Rostedt:

 - Fix UAF in module unload in ftrace when there's a bug in the module

   If a module is buggy and triggers ftrace_disable which is set when an
   anomaly is detected, when it gets unloaded it doesn't free the hooks
   into kallsyms, and when a kallsyms lookup is performed it may access
   the mod->modname field and crash via UAF.

   Fix this by still freeing the mod_maps that are attached to kallsyms
   on module unload regardless if ftrace_disable is set or not.

 - Do not bother allocating mod_maps for kallsyms if ftrace_disable is
   set

 - Remove unused trace events

   When a trace event or tracepoint is created but not used, it still
   creates the code and data structures needed for that trace event.
   This just wastes memory.

   Remove the trace events that are created but not used. This does not
   remove trace events that are created but are not used due configs not
   being set. That will be handled later. This only removes events that
   have no user under any config.

* tag 'trace-v6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  fsdax: Remove unused trace events for dax insert mapping
  genirq/matrix: Remove unused irq_matrix_alloc_reserved tracepoint
  xdp: Remove unused mem_return_failed event
  ftrace: Don't allocate ftrace module map if ftrace is disabled
  ftrace: Fix UAF when lookup kallsym after ftrace disabled

12 days agoMerge tag 'cgroup-for-6.16-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 3 Jun 2025 21:12:36 +0000 (14:12 -0700)]
Merge tag 'cgroup-for-6.16-rc1-fixes' of git://git./linux/kernel/git/tj/cgroup

Pull cgroup fix from Tejun Heo:
 "The rstat per-subsystem split change skipped per-cpu allocation on UP
  configs; however even on UP, depending on config options, the size of
  the percpu struct may not be zero leading to crashes.

  Fix it by conditionalizing the per-cpu area allocation and usage on
  the size of the per-cpu struct"

* tag 'cgroup-for-6.16-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
  cgroup: adjust criteria for rstat subsystem cpu lock access

13 days agoMerge tag 'cxl-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl
Linus Torvalds [Tue, 3 Jun 2025 20:24:14 +0000 (13:24 -0700)]
Merge tag 'cxl-for-6.16' of git://git./linux/kernel/git/cxl/cxl

Pull Compute Express Link (CXL) updates from Dave Jiang:

 - Remove always true condition in cxl features code

 - Add verification of CHBS length for CXL 2.0

 - Ignore interleave granularity when interleave ways is 1

 - Add update addressing mising MODULE_DESCRIPTION for cxl_test

 - A series of cleanups/refactor to prep for AMD Zen5 translate code

 - Clean %pa debug printk in core/hdm.c

 - Documentation updates:
     - Update to CXL Maturity Map
     - Fixes to source linking in CXL documentation
     - CXL documentation fixes, spelling corrections
     - A large collection of CXL documentation for the entire CXL
       subsystem, including documentation on CXL related platform and
       firmware notes

 - Remove redundant code of cxlctl_get_supported_features()

 - Series to support CXL RAS Features
     - Including "Patrol Scrub Control", "Error Check Scrub",
       "Performance Maitenance" and "Memory Sparing". The series
       connects CXL to EDAC.

* tag 'cxl-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: (53 commits)
  cxl/edac: Add CXL memory device soft PPR control feature
  cxl/edac: Add CXL memory device memory sparing control feature
  cxl/edac: Support for finding memory operation attributes from the current boot
  cxl/edac: Add support for PERFORM_MAINTENANCE command
  cxl/edac: Add CXL memory device ECS control feature
  cxl/edac: Add CXL memory device patrol scrub control feature
  cxl: Update prototype of function get_support_feature_info()
  EDAC: Update documentation for the CXL memory patrol scrub control feature
  cxl/features: Remove the inline specifier from to_cxlfs()
  cxl/feature: Remove redundant code of get supported features
  docs: ABI: Fix "firwmare" to "firmware"
  cxl/Documentation: Fix typo in sysfs write_bandwidth attribute path
  cxl: doc/linux/access-coordinates Update access coordinates calculation methods
  cxl: docs/platform/acpi/srat Add generic target documentation
  cxl: docs/platform/cdat reference documentation
  Documentation: Update the CXL Maturity Map
  cxl: Sync up the driver-api/cxl documentation
  cxl: docs - add self-referencing cross-links
  cxl: docs/allocation/hugepages
  cxl: docs/allocation/reclaim
  ...

13 days agoMerge tag 'backlight-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 3 Jun 2025 19:52:25 +0000 (12:52 -0700)]
Merge tag 'backlight-next-6.16' of git://git./linux/kernel/git/lee/backlight

Pull backlight updates from Lee Jones:
 "Framebuffer Subsystem (fbdev):
   - The display's blanking status is now tracked in 'struct fb_info'
   - 'framebuffer_alloc()' initializes the blank state to FB_BLANK_UNBLANK
   - 'register_framebuffer()' sets the state to 'FB_BLANK_POWERDOWN' if
     an 'fb_blank' callback exists, ensuring 'FB_EVENT_BLANK' listeners
     correctly see the display being turned on during the first modeset
   - The 'FB_EVENT_BLANK' event data now includes both the new and the
     old blank states
   - 'fb_blank()' has been reworked to return early on errors, without
     functional changes, in preparation for further state tracking
     improvements
   - Fbdev now calls dedicated functions in the backlight subsystems to
     notify them of blank state changes, instead of relying on fbdev
     event notifiers
   - For LCDs, fbdev also calls a dedicated function to notify of mode
     changes
   - Removed the definitions for the unused fbdev event constants
     'FB_EVENT_MODE_CHANGE' and 'FB_EVENT_BLANK' from the header file

  Backlight Subsystem:
   - Implemented fbdev blank state tracking using the (newly enhanced)
     blank state information provided directly by 'FB_EVENT_BLANK'
   - Removed internal blank state tracking fields ('fb_bl_on') from
     'struct backlight_device'
   - Moved the handling of blank-state updates into a separate internal
     helper function, 'backlight_notify_blank()'
   - Removed support for fbdev events and replaced it with a dedicated
     function call interface ('backlight_notify_blank()' and
     'backlight_notify_blank_all()') for display drivers to update
     backlight status

  LCD Subsystem:
   - Moved the handling of display updates (blank events and mode
     changes) from fbdev event notifiers to separate internal helper
     functions ('lcd_notify_blank',
     'lcd_notify_mode_change')
   - Removed support for fbdev events and replaced it with dedicated
     function call interfaces ('lcd_notify_blank_all()',
     'lcd_notify_mode_change_all()')
   - The LCD subsystem now maintains its own internal list of LCD
     devices instead of relying on fbdev notifiers

  LED Backlight Trigger:
   - Moved the handling of blank-state updates into a separate internal
     helper, 'ledtrig_backlight_notify_blank()'
   - Removed support for fbdev events and replaced it with a dedicated
     function call, 'ledtrig_backlight_blank()', for fbdev to notify
     trigger of blank state changes
   - The LED backlight trigger now maintains its own internal list of
     triggers instead of relying on fbdev notifiers

  Qualcomm WLED Backlight:
   - Added a NULL check after 'devm_kasprintf()' in 'wled_configure()'
     to prevent a potential NULL pointer dereference if memory
     allocation fails"

* tag 'backlight-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
  backlight: pm8941: Add NULL check in wled_configure()
  fbdev: Remove constants of unused events
  leds: backlight trigger: Replace fb events with a dedicated function call
  leds: backlight trigger: Move blank-state handling into helper
  backlight: lcd: Replace fb events with a dedicated function call
  backlight: lcd: Move event handling into helpers
  backlight: Replace fb events with a dedicated function call
  backlight: Move blank-state handling into helper
  backlight: Implement fbdev tracking with blank state from event
  fbdev: Send old blank state in FB_EVENT_BLANK
  fbdev: Track display blanking state
  fbdev: Rework fb_blank()

13 days agofsdax: Remove unused trace events for dax insert mapping
Steven Rostedt [Thu, 29 May 2025 19:22:11 +0000 (15:22 -0400)]
fsdax: Remove unused trace events for dax insert mapping

When the dax_fault_actor() helper was factored out, it removed the calls
to the dax_pmd_insert_mapping and dax_insert_mapping events but never
removed the events themselves. As each event created takes up memory
(roughly 5K each), this is a waste as it is never used.

Remove the unused dax_pmd_insert_mapping and dax_insert_mapping trace
events.

Link: https://lore.kernel.org/all/20250529130138.544ffec4@gandalf.local.home/
Cc: Shiyang Ruan <ruansy.fnst@fujitsu.com>
Cc: "Darrick J. Wong" <djwong@kernel.org>
Cc: Ross Zwisler <zwisler@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: https://lore.kernel.org/20250529152211.688800c9@gandalf.local.home
Fixes: c2436190e492 ("fsdax: factor out a dax_fault_actor() helper")
Acked-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
13 days agoMerge tag 'leds-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds
Linus Torvalds [Tue, 3 Jun 2025 19:10:31 +0000 (12:10 -0700)]
Merge tag 'leds-next-6.16' of git://git./linux/kernel/git/lee/leds

Pull LED updates from Lee Jones:
 "LED Triggers:
   - Allow writing "default" to the sysfs 'trigger' attribute to set an
     LED to its default trigger
   - If the default trigger is "none", writing "default" will remove the
     current trigger
   - Updated sysfs ABI documentation for the new "default" trigger
     functionality

  LED KUnit Testing:
   - Provide a skeleton KUnit test suite for the LEDs framework
   - Expand the LED class device registration KUnit test to cover more
     scenarios, including 'brightness_get' behavior
   - Add KUnit tests for the LED lookup and get API ('led_add_lookup',
     'devm_led_get')

  LED Flash Class:
   - Add support for setting flash/strobe duration through a new
     'duration_set' op and 'led_set_flash_duration()' function, aligning
     with 'V4L2_CID_FLASH_DURATION'

  Texas Instruments TPS6131x:
   - Add a new driver for the TPS61310/TPS61311 flash LED controllers
   - The driver supports the device's three constant-current sinks for
     flash and torch modes

  LED Core:
   - Prevent potential 'snprintf()' truncations in LED names by checking
     for buffer overflows

  ChromeOS EC LEDs:
   - Avoid a -Wflex-array-member-not-at-end GCC warning by replacing an
     on-stack flexible structure definition with a utility function call

  Multicolor LEDs:
   - Fix issue where setting multi_intensity while software blinking is
     active could stop blinking

  PCA955x LEDs:
   - Avoid potential buffer overflow when creating default labels by
     changing a field's type to 'u8' and updating format specifiers

  PCA995x LEDs:
   - Fix a typo (stray space) in an 'of_device_id' entry in the
     'pca995x_of_match' table

  Kconfig:
   - Prevent LED drivers from being enabled by default when
     'COMPILE_TEST' is set

  Device Property API:
   - Split 'device_get_child_node_count()' into a new helper
     'fwnode_get_child_node_count()' that doesn't require a device
     struct, making the API more symmetrical

  Driver Modernization (using 'fwnode_get_child_node_count()'):
   - Update 'leds-pwm-multicolor', 'leds-ncp5623' and 'leds-ncp5623' to
     use the new 'fwnode_get_child_node_count()' helper, removing their
     custom implementation
   - As above in the USB Type-C TCPM driver

  Driver Modernization (using new GPIO setter callbacks):
   - Convert 'leds-lgm-sso' to use new GPIO line value setter callbacks
     which return an integer for error handling
   - Convert 'leds-pca955x', 'leds-pca9532' and 'leds-tca6507' to use
     new GPIO setter callbacks

  Documentation:
   - Remove the '.rst' extension for 'leds-st1202' in the documentation
     index for consistency

  LP8860 LEDs:
   - Use 'regmap_multi_reg_write()' for EEPROM writes instead of manual
     looping
   - Use scoped mutex guards and 'devm_mutex_init()' to simplify
     function exits and ensure automatic cleanup
   - Remove default register definitions that are unused when regmap
     caching is not active
   - Use 'devm_regulator_get_enable_optional()' to handle the optional
     regulator, simplifying enabling and removing manual disabling
   - Refactor 'lp8860_unlock_eeprom()' to only perform the unlock
     operation, removing the lock part and an unnecessary parameter
   - Use a 'devm' action to disable the enable-GPIO, simplifying cleanup
     and error paths, and remove the now-empty '.remove()' function

  Turris Omnia LEDs:
   - Drop unnecessary commas in terminator entries of 'struct attribute'
     and 'struct of_device_id' arrays

  MT6370 RGB LEDs:
   - Use the 'LINEAR_RANGE()' for defining 'struct linear_range' entries
     to improve robustness

  Texas Instruments TPS6131x:
   - Add new devicetree bindings for the TI TPS61310/TPS61311 flash LED
     driver"

* tag 'leds-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (31 commits)
  leds: tps6131x: Add support for Texas Instruments TPS6131X flash LED driver
  dt-bindings: leds: Add Texas Instruments TPS6131x flash LED driver
  leds: flash: Add support for flash/strobe duration
  leds: rgb: leds-mt6370-rgb: Improve definition of some struct linear_range
  leds: led-test: Provide tests for the lookup and get infrastructure
  leds: led-test: Fill out the registration test to cover more test cases
  leds: led-test: Remove standard error checking after KUNIT_ASSERT_*()
  leds: pca995x: Fix typo in pca995x_of_match's of_device_id entry
  leds: Provide skeleton KUnit testing for the LEDs framework
  leds: tca6507: Use new GPIO line value setter callbacks
  leds: pca9532: Use new GPIO line value setter callbacks
  leds: pca955x: Use new GPIO line value setter callbacks
  leds: lgm-sso: Use new GPIO line value setter callbacks
  leds: Do not enable by default during compile testing
  leds: turris-omnia: Drop commas in the terminator entries
  leds: lp8860: Disable GPIO with devm action
  leds: lp8860: Only unlock in lp8860_unlock_eeprom()
  leds: lp8860: Enable regulator using enable_optional helper
  leds: lp8860: Remove default regs when not caching
  leds: lp8860: Use new mutex guards to cleanup function exits
  ...

13 days agoMerge tag 'mfd-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
Linus Torvalds [Tue, 3 Jun 2025 18:53:55 +0000 (11:53 -0700)]
Merge tag 'mfd-next-6.16' of git://git./linux/kernel/git/lee/mfd

Pull MFD updates from Lee Jones:
 "Samsung Exynos ACPM:
   - Populate child platform devices from device tree data
   - Introduce a new API, 'devm_acpm_get_by_node()', for child devices
     to get the ACPM handle

  ROHM PMICs:
   - Add support for the ROHM BD96802 scalable companion PMIC to the
     BD96801 core driver
   - Add support for controlling the BD96802 using the BD96801 regulator
     driver
   - Add support to the BD96805, which is almost identical to the
     BD96801
   - Add support to the BD96806, which is similar to the BD96802

  Maxim MAX77759:
   - Add a core driver for the MAX77759 companion PMIC
   - Add a GPIO driver for the expander functions on the MAX77759
   - Add an NVMEM driver to expose the non-volatile memory on the
     MAX77759

  STMicroelectronics STM32MP25:
   - Add support for the STM32MP25 SoC to the stm32-lptimer
   - Add support for the STM32MP25 to the clocksource driver, handling
     new register access requirements
   - Add support for the STM32MP25 to the PWM driver, enabling up to two
     PWM outputs

  Broadcom BCM590xx:
   - Add support for the BCM59054 PMU
   - Parse the PMU ID and revision to support behavioral differences
     between chip revisions
   - Add regulator support for the BCM59054

  Samsung S2MPG10:
   - Add support for the S2MPG10 PMIC, which communicates via the
     Samsung ACPM firmware instead of I2C

  Exynos ACPM:
   - Improve timeout detection reliability by using ktime APIs instead
     of a loop counter assumption
   - Allow PMIC access during late system shutdown by switching to
     'udelay()' instead of a sleeping function
   - Fix an issue where reading command results longer than 8 bytes
     would fail
   - Silence non-error '-EPROBE_DEFER' messages during boot to clean up
     logs

  Exynos LPASS:
   - Fix an error handling path by switching to
     'devm_regmap_init_mmio()' to prevent resource leaks
   - Fix a bug where 'exynos_lpass_disable()' was called twice in the
     remove function
   - Fix another resource leak in the probe's error path by using
     'devm_add_action_or_reset()'

  Samsung SEC:
   - Handle the s2dos05, which does not have IRQ support, explicitly to
     prevent warnings
   - Fix the core driver to correctly handle errors from
     'sec_irq_init()' instead of ignoring them

  STMPE-SPI:
   - Correct an undeclared identifier in the 'MODULE_DEVICE_TABLE' macro

  MAINTAINERS:
   - Adjust a file path for the Siemens IPC LED drivers entry to fix a
     broken reference

  Maxim Drivers:
   - Correct the spelling of "Electronics" in Samsung copyright headers
     across multiple files

  General:
   - Fix wakeup source memory leaks on device unbind for 88pm886,
     as3722, max14577, max77541, max77705, max8925, rt5033, and
     sprd-sc27xx drivers

  Samsung SEC Drivers:
   - Split the driver into a transport-agnostic core ('sec-core') and
     transport-specific ('sec-i2c', 'sec-acpm') modules to support
     non-I2C devices
   - Merge the 'sec-core' and 'sec-irq' modules to reduce memory
     consumption
   - Move internal APIs to a private header to clean up the public API
   - Improve code style by sorting includes, cleaning up headers,
     sorting device tables, and using helper macros like
     'dev_err_probe()', 'MFD_CELL', and 'REGMAP_IRQ_REG'
   - Make regmap configuration for s2dos05/s2mpu05 explicit to improve
     clarity
   - Rework platform data and regmap instantiation to use OF match data
     instead of a large switch statement

  ROHM BD96801/2:
   - Prepare the driver for new models by separating chip-specific data
     into its own structure
   - Drop IC name prefix from IRQ resource names in both the MFD and
     regulator drivers for simplification

  Broadcom BCM590xx:
   - Refactor the regulator driver to store descriptions in a table to
     ease support for new chips
   - Rename BCM59056-specific data to prepare for the addition of other
     regulators
   - Use 'dev_err_probe()' for cleaner error handling

  Exynos ACPM:
   - Correct kerneldoc warnings and use the conventional 'np' argument
     name

  General MFD:
   - Convert 'aat2870' and 'tps65010' to use the per-client debugfs
     directory provided by the I2C core
   - Convert 'sm501', 'tps65010' and 'ucb1x00' to use the new GPIO line
     value setter callbacks
   - Constify 'regmap_irq_chip' and other structures in '88pm886' to
     move data to read-only sections

  BCM590xx:
   - Drop the unused "id" member from the 'bcm590xx' struct in
     preparation for a replacement

  Samsung SEC Core:
   - Remove forward declarations for functions that no longer exist

  SM501:
   - Remove the unused 'sm501_find_clock()' function

  New Compatibles:
   - Google: Add a PMIC child node to the 'google,gs101-acpm-ipc'
     binding
   - ROHM: Add new bindings for 'rohm,bd96802-regulator' and
     'rohm,bd96802-pmic', and add compatibles for BD96805 and BD96806
   - Maxim: Add new bindings for 'maxim,max77759-gpio',
     'maxim,max77759-nvmem', and the top-level 'maxim,max77759'
   - STM: Add 'stm32mp25' compatible to the 'stm32-lptimer' binding
   - Broadcom: Add 'bcm59054' compatible
   - Atmel/Microchip: Add 'microchip,sama7d65-gpbr' and
     'microchip,sama7d65-secumod' compatibles
   - Samsung: Add 's2mpg10' compatible to the 'samsung,s2mps11' MFD
     binding
   - MediaTek: Add compatibles for 'mt6893' (scpsys), 'mt7988-topmisc',
     and 'mt8365-infracfg-nao'
   - Qualcomm: Add 'qcom,apq8064-mmss-sfpb' and 'qcom,apq8064-sps-sic'
     syscon compatibles

  Refactoring & Cleanup:
   - Convert Broadcom BCM59056 devicetree bindings to YAML and split
     them into MFD and regulator parts
   - Convert the Microchip AT91 secumod binding to YAML
   - Drop unrelated consumer nodes from binding examples to reduce bloat
   - Correct indentation and style in various DTS examples"

* tag 'mfd-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (81 commits)
  mfd: maxim: Correct Samsung "Electronics" spelling in copyright headers
  mfd: maxim: Correct Samsung "Electronics" spelling in headers
  mfd: sm501: Remove unused sm501_find_clock
  mfd: 88pm886: Constify struct regmap_irq_chip and some other structures
  dt-bindings: mfd: syscon: Add mediatek,mt8365-infracfg-nao
  mfd: sprd-sc27xx: Fix wakeup source leaks on device unbind
  mfd: rt5033: Fix wakeup source leaks on device unbind
  mfd: max8925: Fix wakeup source leaks on device unbind
  mfd: max77705: Fix wakeup source leaks on device unbind
  mfd: max77541: Fix wakeup source leaks on device unbind
  mfd: max14577: Fix wakeup source leaks on device unbind
  mfd: as3722: Fix wakeup source leaks on device unbind
  mfd: 88pm886: Fix wakeup source leaks on device unbind
  dt-bindings: mfd: Correct indentation and style in DTS example
  dt-bindings: mfd: Drop unrelated nodes from DTS example
  dt-bindings: mfd: syscon: Add qcom,apq8064-sps-sic
  dt-bindings: mfd: syscon: Add qcom,apq8064-mmss-sfpb
  mfd: stmpe-spi: Correct the name used in MODULE_DEVICE_TABLE
  dt-bindings: mfd: syscon: Add mt7988-topmisc
  mfd: exynos-lpass: Fix another error handling path in exynos_lpass_probe()
  ...

13 days agosched_ext: idle: Skip cross-node search with !CONFIG_NUMA
Andrea Righi [Tue, 3 Jun 2025 08:22:01 +0000 (10:22 +0200)]
sched_ext: idle: Skip cross-node search with !CONFIG_NUMA

In the idle CPU selection logic, attempting cross-node searches adds
unnecessary complexity when CONFIG_NUMA is disabled.

Since there's no meaningful concept of nodes in this case, simplify the
logic by restricting the idle CPU search to the current node only.

Fixes: 48849271e6611 ("sched_ext: idle: Per-node idle cpumasks")
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
13 days agoMerge tag 'hid-for-linus-2025060301' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 3 Jun 2025 17:34:36 +0000 (10:34 -0700)]
Merge tag 'hid-for-linus-2025060301' of git://git./linux/kernel/git/hid/hid

Pull HID updates from Jiri Kosina:

 - support for Apple Magic Mouse 2 USB-C (Aditya Garg)

 - power management improvement for multitouch devices (Werner Sembach)

 - fix for ACPI initialization in intel-thc driver (Wentao Guan)

 - adaptation of HID drivers to use new gpio_chip's line setter
   callbacks (Bartosz Golaszewski)

 - fix potential OOB in usbhid_parse() (Terry Junge)

 - make it possible to set hid_mouse_ignore_list dynamically (the same
   way we handle other quirks) (Aditya Garg)

 - other small assorted fixes and device ID additions

* tag 'hid-for-linus-2025060301' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
  HID: multitouch: Disable touchpad on firmware level while not in use
  HID: core: Add functions for HID drivers to react on first open and last close call
  HID: HID_APPLETB_BL should depend on X86
  HID: HID_APPLETB_KBD should depend on X86
  HID: appletb-kbd: Use secs_to_jiffies() instead of msecs_to_jiffies()
  HID: intel-thc-hid: intel-thc: make read-only arrays static const
  HID: magicmouse: Apple Magic Mouse 2 USB-C support
  HID: mcp2221: use new line value setter callbacks
  HID: mcp2200: use new line value setter callbacks
  HID: cp2112: use new line value setter callbacks
  HID: cp2112: use lock guards
  HID: cp2112: hold the lock for the entire direction_output() call
  HID: cp2112: destroy mutex on driver detach
  HID: intel-thc-hid: intel-quicki2c: pass correct arguments to acpi_evaluate_object
  HID: corsair-void: Use to_delayed_work()
  HID: hid-logitech: use sysfs_emit_at() instead of scnprintf()
  HID: quirks: Add HID_QUIRK_IGNORE_MOUSE quirk
  HID: usbhid: Eliminate recurrent out-of-bounds bug in usbhid_parse()
  HID: Kysona: Add periodic online check

13 days agodm-stripe: small code cleanup
Mikulas Patocka [Tue, 3 Jun 2025 16:58:47 +0000 (18:58 +0200)]
dm-stripe: small code cleanup

This commit doesn't fix any bug, it is just code cleanup. Use the
function format_dev_t instead of sprintf, because format_dev_t does the
same thing.

Remove the useless memset call.

An unsigned integer can take at most 10 digits, so extend the array size
to 22. (note that because the range of minor and major numbers is limited,
the size 16 could not be exceeded, thus this function couldn't write
beyond string end)

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
13 days agodm-verity: fix a memory leak if some arguments are specified multiple times
Mikulas Patocka [Tue, 3 Jun 2025 16:55:50 +0000 (18:55 +0200)]
dm-verity: fix a memory leak if some arguments are specified multiple times

If some of the arguments "check_at_most_once", "ignore_zero_blocks",
"use_fec_from_device", "root_hash_sig_key_desc" were specified more than
once on the target line, a memory leak would happen.

This commit fixes the memory leak. It also fixes error handling in
verity_verify_sig_parse_opt_args.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
13 days agodm-mirror: fix a tiny race condition
Mikulas Patocka [Tue, 3 Jun 2025 16:53:17 +0000 (18:53 +0200)]
dm-mirror: fix a tiny race condition

There's a tiny race condition in dm-mirror. The functions queue_bio and
write_callback grab a spinlock, add a bio to the list, drop the spinlock
and wake up the mirrord thread that processes bios in the list.

It may be possible that the mirrord thread processes the bio just after
spin_unlock_irqrestore is called, before wakeup_mirrord. This spurious
wake-up is normally harmless, however if the device mapper device is
unloaded just after the bio was processed, it may be possible that
wakeup_mirrord(ms) uses invalid "ms" pointer.

Fix this bug by moving wakeup_mirrord inside the spinlock.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
13 days agoMerge tag 'ata-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/libata...
Linus Torvalds [Tue, 3 Jun 2025 16:42:38 +0000 (09:42 -0700)]
Merge tag 'ata-6.16-rc1' of git://git./linux/kernel/git/libata/linux

Pull ata updates from Damien Le Moal:

 - Simplify ata_print_version_once() using dev_dbg_once() (Heiner)

 - Some cleanups of libata-sata code to simplify the sense data fetching
   code and use BIT() macro for tag bit handling (Niklas)

 - Fix variable name spelling in the sata_sx4 driver (Colin)

 - Improve sense data information field handling for passthrough
   commands (Igor)

 - Add Rockchip RK3576 SoC compatible to the Designware AHCI DT bindings
   (Nicolas)

 - Add a message to indicate if a port is marked as external or not, to
   help with debugging potential issues with LPM (Niklas)

 - Convert DT bindings for "ti,dm816-ahci", "apm,xgene-ahci",
   "cavium,ebt3000-compact-flash", "marvell,orion-sata", and
   "arasan,cf-spear1340" to DT schema (Rob)

 - Cleanup and improve the code and related comments for HIPM and DIPM
   (host initiated and device initiated power managent) handling.

   In particular, keep DIPM disabled while modifying the allowed LPM
   states to avoid races with the device initiating power state changes
   (Niklas)

* tag 'ata-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
  ata: libata-eh: Keep DIPM disabled while modifying the allowed LPM states
  ata: libata-eh: Rename no_dipm variable to be more clear
  ata: libata-eh: Rename hipm and dipm variables
  ata: libata-eh: Add ata_eh_set_lpm() WARN_ON_ONCE
  ata: libata-eh: Update DIPM comments to reflect reality
  dt-bindings: ata: Convert arasan,cf-spear1340 to DT schema
  dt-bindings: ata: Convert marvell,orion-sata to DT schema
  dt-bindings: ata: Convert cavium,ebt3000-compact-flash to DT schema
  dt-bindings: ata: Convert apm,xgene-ahci to DT schema
  dt-bindings: ata: Convert st,ahci to DT schema
  dt-bindings: ata: Convert ti,dm816-ahci to DT schema
  ata: libata: Print if port is external on boot
  dt-bindings: ata: rockchip-dwc-ahci: add RK3576 compatible
  ata: libata-scsi: Do not set the INFORMATION field twice for ATA PT
  ata: sata_sx4: Fix spelling mistake "parttern" -> "pattern"
  ata: libata-sata: Use BIT() macro to convert tag to bit field
  ata: libata-sata: Simplify sense_valid fetching
  ata: libata-core: Simplify ata_print_version_once

13 days agoMerge tag 'hwmon-for-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck...
Linus Torvalds [Tue, 3 Jun 2025 16:11:26 +0000 (09:11 -0700)]
Merge tag 'hwmon-for-v6.16' of git://git./linux/kernel/git/groeck/linux-staging

Pull hwmon updates from Guenter Roeck:
 "New drivers:
   - KEBA fan controller
   - KEBA battery monitoring controller
   - MAX77705

  Support added to existing drivers:
   - MAXIMUS VI HERO and ROG MAXIMUS Z90 Formula support (asus-ec-sensors)
   - SQ52206 support (ina238)
   - lt3074 support (pmbus/lt3074)
   - ADPM12160 support (pmbus/max34440)
   - MPM82504 and for MPM3695 family support (pmbus/mpq8785)
   - Add the Dell OptiPlex 7050 to the DMI whitelist (dell-smm)
   - Zen5 Ryzen Desktop support (k10temp)

  Various other minor fixes and improvements"

* tag 'hwmon-for-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (48 commits)
  doc: hwmon: acpi_power_meter: Add information about enabling the power capping feature.
  hwmon: (isl28022) Fix current reading calculation
  hwmon: (lm75) Fix I3C transfer buffer pointer for incoming data
  hwmon: Add KEBA fan controller support
  hwmon: pmbus: mpq8785: Add support for MPM3695 family
  hwmon: pmbus: mpq8785: Add support for MPM82504
  hwmon: pmbus: mpq8785: Implement VOUT feedback resistor divider ratio configuration
  hwmon: pmbus: mpq8785: Prepare driver for multiple device support
  dt-bindings: hwmon: Add bindings for mpq8785 driver
  hwmon: (ina238) Modify the calculation formula to adapt to different chips
  hwmon: (ina238) Add support for SQ52206
  dt-bindings: Add SQ52206 to ina2xx devicetree bindings
  hwmon: (ina238) Add ina238_config to save configurations for different chips
  hwmon: (ausus-ec-sensors) add MAXIMUS VI HERO.
  hwmon: (isl28022, nct7363) Convert to use maple tree register cache
  hwmon: (asus-ec-sensors) check sensor index in read_string()
  hwmon: (asus-ec-sensors) add ROG MAXIMUS Z90 Formula.
  dt-bindings: hwmon: Add Sophgo SG2044 external hardware monitor support
  hwmon: (max77705) Add initial support
  hwmon: (tmp102) add vcc regulator support
  ...

13 days agoMerge tag 'xtensa-20250603' of https://github.com/jcmvbkbc/linux-xtensa
Linus Torvalds [Tue, 3 Jun 2025 16:05:01 +0000 (09:05 -0700)]
Merge tag 'xtensa-20250603' of https://github.com/jcmvbkbc/linux-xtensa

Pull xtensa updates from Max Filippov:

 - migrate to the generic rule for built-in DTB

 - cleanups in code and common_defconfig

* tag 'xtensa-20250603' of https://github.com/jcmvbkbc/linux-xtensa:
  arch: xtensa: defconfig: Drop obsolete CONFIG_NET_CLS_TCINDEX
  xtensa: migrate to the generic rule for built-in DTB
  xtensa: ptrace: Remove zero-length alignment array

13 days agoMerge tag 'hyperv-next-signed-20250602' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 3 Jun 2025 15:39:20 +0000 (08:39 -0700)]
Merge tag 'hyperv-next-signed-20250602' of git://git./linux/kernel/git/hyperv/linux

Pull hyperv updates from Wei Liu:

 - Support for Virtual Trust Level (VTL) on arm64 (Roman Kisel)

 - Fixes for Hyper-V UIO driver (Long Li)

 - Fixes for Hyper-V PCI driver (Michael Kelley)

 - Select CONFIG_SYSFB for Hyper-V guests (Michael Kelley)

 - Documentation updates for Hyper-V VMBus (Michael Kelley)

 - Enhance logging for hv_kvp_daemon (Shradha Gupta)

* tag 'hyperv-next-signed-20250602' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: (23 commits)
  Drivers: hv: Always select CONFIG_SYSFB for Hyper-V guests
  Drivers: hv: vmbus: Add comments about races with "channels" sysfs dir
  Documentation: hyperv: Update VMBus doc with new features and info
  PCI: hv: Remove unnecessary flex array in struct pci_packet
  Drivers: hv: Remove hv_alloc/free_* helpers
  Drivers: hv: Use kzalloc for panic page allocation
  uio_hv_generic: Align ring size to system page
  uio_hv_generic: Use correct size for interrupt and monitor pages
  Drivers: hv: Allocate interrupt and monitor pages aligned to system page boundary
  arch/x86: Provide the CPU number in the wakeup AP callback
  x86/hyperv: Fix APIC ID and VP index confusion in hv_snp_boot_ap()
  PCI: hv: Get vPCI MSI IRQ domain from DeviceTree
  ACPI: irq: Introduce acpi_get_gsi_dispatcher()
  Drivers: hv: vmbus: Introduce hv_get_vmbus_root_device()
  Drivers: hv: vmbus: Get the IRQ number from DeviceTree
  dt-bindings: microsoft,vmbus: Add interrupt and DMA coherence properties
  arm64, x86: hyperv: Report the VTL the system boots in
  arm64: hyperv: Initialize the Virtual Trust Level field
  Drivers: hv: Provide arch-neutral implementation of get_vtl()
  Drivers: hv: Enable VTL mode for arm64
  ...

13 days agoMerge tag 'v6.16-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Tue, 3 Jun 2025 15:03:45 +0000 (08:03 -0700)]
Merge tag 'v6.16-p3' of git://git./linux/kernel/git/herbert/crypto-2.6

Pull crypto fixes from Herbert Xu:
 "Fix a loongarch header regression and a module name collision on s390"

* tag 'v6.16-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  asm-generic: Add sched.h inclusion in simd.h
  crypto: s390/sha256 - rename module to sha256-s390

13 days agoMerge tag 'bitmap-for-6.16-rc1' of https://github.com/norov/linux
Linus Torvalds [Tue, 3 Jun 2025 14:39:23 +0000 (07:39 -0700)]
Merge tag 'bitmap-for-6.16-rc1' of https://github.com/norov/linux

Pull bitmap updates from Yury Norov:

 - dead code cleanups for cpumasks and nodemasks (me)

 - fixed-width flavors of GENMASK() and BIT() (Vincent, Lucas and me)

 - FIELD_MODIFY() helper (Luo)

 - for_each_node_with_cpus() optimization (me)

 - bitmap-str fixes (Andy)

* tag 'bitmap-for-6.16-rc1' of https://github.com/norov/linux:
  topology: make for_each_node_with_cpus() O(N)
  bitfield: Add FIELD_MODIFY() helper
  bitmap-str: Add missing header(s)
  bitmap-str: Get rid of 'extern' for function prototypes
  build_bug.h: more user friendly error messages in BUILD_BUG_ON_ZERO()
  test_bits: add tests for BIT_U*()
  test_bits: add tests for GENMASK_U*()
  drm/i915: Convert REG_GENMASK*() to fixed-width GENMASK_U*()
  bits: introduce fixed-type BIT_U*()
  bits: introduce fixed-type GENMASK_U*()
  bits: add comments and newlines to #if, #else and #endif directives
  cpumask: drop cpumask_assign_cpu()
  riscv: switch set_icache_stale_mask() to using non-atomic assign_cpu()
  cpumask: add non-atomic __assign_cpu()
  nodemask: drop nodes_shift

13 days agomfd: maxim: Correct Samsung "Electronics" spelling in copyright headers
Sumanth Gavini [Mon, 19 May 2025 23:20:23 +0000 (16:20 -0700)]
mfd: maxim: Correct Samsung "Electronics" spelling in copyright headers

Fix the misspelling of 'Electronics' in MFD driver copyright headers.

Link: https://lore.kernel.org/lkml/3aa30119-60e5-4dcb-b13a-1753966ca775@sirena.org.uk/#t
Link: https://lore.kernel.org/r/20250519232025.152769-1-sumanth.gavini@yahoo.com
Signed-off-by: Sumanth Gavini <sumanth.gavini@yahoo.com>
Signed-off-by: Lee Jones <lee@kernel.org>
13 days agomfd: maxim: Correct Samsung "Electronics" spelling in headers
Sumanth Gavini [Tue, 20 May 2025 02:08:05 +0000 (19:08 -0700)]
mfd: maxim: Correct Samsung "Electronics" spelling in headers

Fix the misspelling of 'Electronics' in MFD driver headers.

Link: https://lore.kernel.org/lkml/3aa30119-60e5-4dcb-b13a-1753966ca775@sirena.org.uk/#t
Link: https://lore.kernel.org/r/20250520020808.159586-1-sumanth.gavini@yahoo.com
Signed-off-by: Sumanth Gavini <sumanth.gavini@yahoo.com>
Signed-off-by: Lee Jones <lee@kernel.org>
13 days agoMerge branch 'for-6.16/core' into for-linus
Jiri Kosina [Tue, 3 Jun 2025 07:32:30 +0000 (09:32 +0200)]
Merge branch 'for-6.16/core' into for-linus

- power management improvement for multitouch devices (Werner Sembach)

13 days agoMerge branch 'for-6.16/magicmouse' into for-linus
Jiri Kosina [Tue, 3 Jun 2025 07:27:46 +0000 (09:27 +0200)]
Merge branch 'for-6.16/magicmouse' into for-linus

- support for Apple Magic Mouse 2 USB-C (Aditya Garg)

13 days agoMerge branch 'for-6.16/logitech' into for-linus
Jiri Kosina [Tue, 3 Jun 2025 07:27:32 +0000 (09:27 +0200)]
Merge branch 'for-6.16/logitech' into for-linus

13 days agoMerge branch 'for-6.16/kysona' into for-linus
Jiri Kosina [Tue, 3 Jun 2025 07:26:50 +0000 (09:26 +0200)]
Merge branch 'for-6.16/kysona' into for-linus

- power management improvement (Lode Willems)

13 days agoMerge branch 'for-6.16/intel-thc' into for-linus
Jiri Kosina [Tue, 3 Jun 2025 07:26:12 +0000 (09:26 +0200)]
Merge branch 'for-6.16/intel-thc' into for-linus

- fix for ACPI initialization (Wentao Guan)

13 days agoMerge branch 'for-6.16/hid-gpio-setter-callbacks' into for-linus
Jiri Kosina [Tue, 3 Jun 2025 07:25:26 +0000 (09:25 +0200)]
Merge branch 'for-6.16/hid-gpio-setter-callbacks' into for-linus

- adapt HID drivers to use new gpio_chip's line setter callbacks
  (Bartosz Golaszewski)

13 days agoMerge branch 'for-6.16/corsair' into for-linus
Jiri Kosina [Tue, 3 Jun 2025 07:24:39 +0000 (09:24 +0200)]
Merge branch 'for-6.16/corsair' into for-linus

13 days agoMerge branch 'for-6.16/core' into for-linus
Jiri Kosina [Tue, 3 Jun 2025 07:23:09 +0000 (09:23 +0200)]
Merge branch 'for-6.16/core' into for-linus

- make it possible to set hid_mouse_ignore_list dynamically (the same way we
  handle other quirks) (Aditya Garg)
- fix potential OOB in usbhid_parse() (Terry Junge)

13 days agoMerge branch 'for-6.16/apple' into for-linus
Jiri Kosina [Tue, 3 Jun 2025 07:21:55 +0000 (09:21 +0200)]
Merge branch 'for-6.16/apple' into for-linus

- Kconfig dependency fixes (Geert Uytterhoeven)
- time scaling fix for appletb_tb_idle_timeout and appletb_tb_dim_timeout
  parameters (Thorsten Blum)

13 days agoMerge tag 'bootconfig-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
Linus Torvalds [Tue, 3 Jun 2025 00:39:24 +0000 (17:39 -0700)]
Merge tag 'bootconfig-v6.16' of git://git./linux/kernel/git/trace/linux-trace

Pull bootconfig updates from Masami Hiramatsu:

 - Allow overriding CFLAGS and LDFLAGS for tools/bootconfig, for example
   making it a static binary.

* tag 'bootconfig-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  tools/bootconfig: specify LDFLAGS as an argument to CC
  tools/bootconfig: allow overriding CFLAGS assignment

13 days agoMerge tag 'modules-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/modules...
Linus Torvalds [Tue, 3 Jun 2025 00:35:06 +0000 (17:35 -0700)]
Merge tag 'modules-6.16-rc1' of git://git./linux/kernel/git/modules/linux

Pull module updates from Petr Pavlu:

 - Make .static_call_sites in modules read-only after init

   The .static_call_sites sections in modules have been made read-only
   after init to avoid any (non-)accidental modifications, similarly to
   how they are read-only after init in vmlinux

 - The rest are minor cleanups

* tag 'modules-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux:
  module: Remove outdated comment about text_size
  module: Make .static_call_sites read-only after init
  module: Add a separate function to mark sections as read-only after init
  module: Constify parameters of module_enforce_rwx_sections()

13 days agoMerge tag 'mm-stable-2025-06-01-14-06' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 2 Jun 2025 23:00:26 +0000 (16:00 -0700)]
Merge tag 'mm-stable-2025-06-01-14-06' of git://git./linux/kernel/git/akpm/mm

Pull more MM updates from Andrew Morton:

 - "zram: support algorithm-specific parameters" from Sergey Senozhatsky
   adds infrastructure for passing algorithm-specific parameters into
   zram. A single parameter `winbits' is implemented at this time.

 - "memcg: nmi-safe kmem charging" from Shakeel Butt makes memcg
   charging nmi-safe, which is required by BFP, which can operate in NMI
   context.

 - "Some random fixes and cleanup to shmem" from Kemeng Shi implements
   small fixes and cleanups in the shmem code.

 - "Skip mm selftests instead when kernel features are not present" from
   Zi Yan fixes some issues in the MM selftest code.

 - "mm/damon: build-enable essential DAMON components by default" from
   SeongJae Park reworks DAMON Kconfig to make it easier to enable
   CONFIG_DAMON.

 - "sched/numa: add statistics of numa balance task migration" from Libo
   Chen adds more info into sysfs and procfs files to improve visibility
   into the NUMA balancer's task migration activity.

 - "selftests/mm: cow and gup_longterm cleanups" from Mark Brown
   provides various updates to some of the MM selftests to make them
   play better with the overall containing framework.

* tag 'mm-stable-2025-06-01-14-06' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (43 commits)
  mm/khugepaged: clean up refcount check using folio_expected_ref_count()
  selftests/mm: fix test result reporting in gup_longterm
  selftests/mm: report unique test names for each cow test
  selftests/mm: add helper for logging test start and results
  selftests/mm: use standard ksft_finished() in cow and gup_longterm
  selftests/damon/_damon_sysfs: skip testcases if CONFIG_DAMON_SYSFS is disabled
  sched/numa: add statistics of numa balance task
  sched/numa: fix task swap by skipping kernel threads
  tools/testing: check correct variable in open_procmap()
  tools/testing/vma: add missing function stub
  mm/gup: update comment explaining why gup_fast() disables IRQs
  selftests/mm: two fixes for the pfnmap test
  mm/khugepaged: fix race with folio split/free using temporary reference
  mm: add CONFIG_PAGE_BLOCK_ORDER to select page block order
  mmu_notifiers: remove leftover stub macros
  selftests/mm: deduplicate test names in madv_populate
  kcov: rust: add flags for KCOV with Rust
  mm: rust: make CONFIG_MMU ifdefs more narrow
  mmu_gather: move tlb flush for VM_PFNMAP/VM_MIXEDMAP vmas into free_pgtables()
  mm/damon/Kconfig: enable CONFIG_DAMON by default
  ...

13 days agoMerge tag 'gfs2-for-6.16-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2...
Linus Torvalds [Mon, 2 Jun 2025 22:53:43 +0000 (15:53 -0700)]
Merge tag 'gfs2-for-6.16-fix' of git://git./linux/kernel/git/gfs2/linux-gfs2

Pull gfs2 fix from Andreas Gruenbacher:

 - Fix a NULL pointer dereference reported by syzbot

* tag 'gfs2-for-6.16-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
  gfs2: Don't clear sb->s_fs_info in gfs2_sys_fs_add

13 days agoMerge tag 'fuse-update-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/mszered...
Linus Torvalds [Mon, 2 Jun 2025 22:31:05 +0000 (15:31 -0700)]
Merge tag 'fuse-update-6.16' of git://git./linux/kernel/git/mszeredi/fuse

Pull fuse updates from Miklos Szeredi:

 - Remove tmp page copying in writeback path (Joanne).

   This removes ~300 lines and with that a lot of complexity related to
   avoiding reclaim related deadlock. The old mechanism is replaced with
   a mapping flag that tells the MM not to block reclaim waiting for
   writeback to complete. The MM parts have been reviewed/acked by
   respective maintainers.

 - Convert more code to handle large folios (Joanne). This still just
   adds the code to deal with large folios and does not enable them yet.

 - Allow invalidating all cached lookups atomically (Luis Henriques).
   This feature is useful for CernVMFS, which currently does this
   iteratively.

 - Align write prefaulting in fuse with generic one (Dave Hansen)

 - Fix race causing invalid data to be cached when setting attributes on
   different nodes of a distributed fs (Guang Yuan Wu)

 - Update documentation for passthrough (Chen Linxuan)

 - Add fdinfo about the device number associated with an opened
   /dev/fuse instance (Chen Linxuan)

 - Increase readdir buffer size (Miklos). This depends on a patch to VFS
   readdir code that was already merged through Christians tree.

 - Optimize io-uring request expiration (Joanne)

 - Misc cleanups

* tag 'fuse-update-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: (25 commits)
  fuse: increase readdir buffer size
  readdir: supply dir_context.count as readdir buffer size hint
  fuse: don't allow signals to interrupt getdents copying
  fuse: support large folios for writeback
  fuse: support large folios for readahead
  fuse: support large folios for queued writes
  fuse: support large folios for stores
  fuse: support large folios for symlinks
  fuse: support large folios for folio reads
  fuse: support large folios for writethrough writes
  fuse: refactor fuse_fill_write_pages()
  fuse: support large folios for retrieves
  fuse: support copying large folios
  fs: fuse: add dev id to /dev/fuse fdinfo
  docs: filesystems: add fuse-passthrough.rst
  MAINTAINERS: update filter of FUSE documentation
  fuse: fix race between concurrent setattrs from multiple nodes
  fuse: remove tmp folio for writebacks and internal rb tree
  mm: skip folio reclaim in legacy memcg contexts for deadlockable mappings
  fuse: optimize over-io-uring request expiration check
  ...

13 days agocifs: update the lock ordering comments with new mutex
Shyam Prasad N [Tue, 29 Apr 2025 12:02:36 +0000 (12:02 +0000)]
cifs: update the lock ordering comments with new mutex

The lock ordering rules listed as comments in cifsglob.h were
missing some lock details and also the fid_lock.

Updated those notes in this commit.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
13 days agoMerge tag 'vfs-6.16-rc1.netfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Linus Torvalds [Mon, 2 Jun 2025 22:04:06 +0000 (15:04 -0700)]
Merge tag 'vfs-6.16-rc1.netfs' of git://git./linux/kernel/git/vfs/vfs

Pull netfs updates from Christian Brauner:

 - The main API document has been extensively updated/rewritten

 - Fix an oops in write-retry due to mis-resetting the I/O iterator

 - Fix the recording of transferred bytes for short DIO reads

 - Fix a request's work item to not require a reference, thereby
   avoiding the need to get rid of it in BH/IRQ context

 - Fix waiting and waking to be consistent about the waitqueue used

 - Remove NETFS_SREQ_SEEK_DATA_READ, NETFS_INVALID_WRITE,
   NETFS_ICTX_WRITETHROUGH, NETFS_READ_HOLE_CLEAR,
   NETFS_RREQ_DONT_UNLOCK_FOLIOS, and NETFS_RREQ_BLOCKED

 - Reorder structs to eliminate holes

 - Remove netfs_io_request::ractl

 - Only provide proc_link field if CONFIG_PROC_FS=y

 - Remove folio_queue::marks3

 - Fix undifferentiation of DIO reads from unbuffered reads

* tag 'vfs-6.16-rc1.netfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  netfs: Fix undifferentiation of DIO reads from unbuffered reads
  netfs: Fix wait/wake to be consistent about the waitqueue used
  netfs: Fix the request's work item to not require a ref
  netfs: Fix setting of transferred bytes with short DIO reads
  netfs: Fix oops in write-retry from mis-resetting the subreq iterator
  fs/netfs: remove unused flag NETFS_RREQ_BLOCKED
  fs/netfs: remove unused flag NETFS_RREQ_DONT_UNLOCK_FOLIOS
  folio_queue: remove unused field `marks3`
  fs/netfs: declare field `proc_link` only if CONFIG_PROC_FS=y
  fs/netfs: remove `netfs_io_request.ractl`
  fs/netfs: reorder struct fields to eliminate holes
  fs/netfs: remove unused enum choice NETFS_READ_HOLE_CLEAR
  fs/netfs: remove unused flag NETFS_ICTX_WRITETHROUGH
  fs/netfs: remove unused source NETFS_INVALID_WRITE
  fs/netfs: remove unused flag NETFS_SREQ_SEEK_DATA_READ

13 days agoPCI: j721e: Fix host/endpoint dependencies
Arnd Bergmann [Wed, 23 Apr 2025 16:25:16 +0000 (18:25 +0200)]
PCI: j721e: Fix host/endpoint dependencies

The j721e driver has a single platform driver that can be built-in or a
loadable module, but it calls two separate backend drivers depending on
whether it is a host or endpoint.

If the two modes are not the same, we can end up with a situation where the
built-in pci-j721e driver tries to call the modular host or endpoint
driver, which causes a link failure:

  ld.lld-21: error: undefined symbol: cdns_pcie_ep_setup
  >>> referenced by pci-j721e.c
  >>>               drivers/pci/controller/cadence/pci-j721e.o:(j721e_pcie_probe) in archive vmlinux.a

  ld.lld-21: error: undefined symbol: cdns_pcie_host_setup
  >>> referenced by pci-j721e.c
  >>>               drivers/pci/controller/cadence/pci-j721e.o:(j721e_pcie_probe) in archive vmlinux.a

Rework the dependencies so that the 'select' is done by the common Kconfig
symbol, based on which of the two are enabled. Effectively this means that
having one built-in makes the other either built-in or disabled, but all
configurations will now build.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20250423162523.2060405-1-arnd@kernel.org
13 days agoPCI: j721e: Add support to build as a loadable module
Siddharth Vadapalli [Thu, 17 Apr 2025 12:44:08 +0000 (18:14 +0530)]
PCI: j721e: Add support to build as a loadable module

The 'pci-j721e.c' driver is the application/glue/wrapper driver for the
Cadence PCIe Controllers on TI SoCs. Implement support for building it as a
loadable module.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://patch.msgid.link/20250417124408.2752248-5-s-vadapalli@ti.com
13 days agoPCI: cadence-ep: Introduce cdns_pcie_ep_disable() helper for cleanup
Siddharth Vadapalli [Thu, 17 Apr 2025 12:44:07 +0000 (18:14 +0530)]
PCI: cadence-ep: Introduce cdns_pcie_ep_disable() helper for cleanup

Introduce the helper function cdns_pcie_ep_disable() which will undo the
configuration performed by cdns_pcie_ep_setup(). Also, export it for use
by the existing callers of cdns_pcie_ep_setup(), thereby allowing them
to cleanup on their exit path.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://patch.msgid.link/20250417124408.2752248-4-s-vadapalli@ti.com
13 days agoPCI: cadence-host: Introduce cdns_pcie_host_disable() helper for cleanup
Siddharth Vadapalli [Thu, 17 Apr 2025 12:44:06 +0000 (18:14 +0530)]
PCI: cadence-host: Introduce cdns_pcie_host_disable() helper for cleanup

Introduce the helper function cdns_pcie_host_disable() which will undo
the configuration performed by cdns_pcie_host_setup(). Also, export it
for use by existing callers of cdns_pcie_host_setup(), thereby allowing
them to cleanup on their exit path.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://patch.msgid.link/20250417124408.2752248-3-s-vadapalli@ti.com
13 days agoPCI: cadence: Add support to build pcie-cadence library as a kernel module
Kishon Vijay Abraham I [Thu, 17 Apr 2025 12:44:05 +0000 (18:14 +0530)]
PCI: cadence: Add support to build pcie-cadence library as a kernel module

Currently, the Cadence PCIe controller driver can be built as a built-in
module only. Since PCIe functionality is not a necessity for booting, add
support to build the Cadence PCIe driver as a loadable module as well.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://patch.msgid.link/20250417124408.2752248-2-s-vadapalli@ti.com
2 weeks agoMAINTAINERS: Update Krzysztof Wilczyński email address
Krzysztof Wilczyński [Fri, 18 Apr 2025 04:52:51 +0000 (04:52 +0000)]
MAINTAINERS: Update Krzysztof Wilczyński email address

Update my e-mail address and add relevant entries to the .mailmap file.

[bhelgaas: drop maintainer status change]
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20250418045251.7434-1-kwilczynski@kernel.org
2 weeks agoPCI: Remove unnecessary linesplit in __pci_setup_bridge()
Ilpo Järvinen [Fri, 4 Apr 2025 12:45:47 +0000 (15:45 +0300)]
PCI: Remove unnecessary linesplit in __pci_setup_bridge()

No need to split the line in __pci_setup_bridge() as it is way shorter
than the limit.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20250404124547.51185-1-ilpo.jarvinen@linux.intel.com
2 weeks agoMerge tag 'vfs-6.16-rc2.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Linus Torvalds [Mon, 2 Jun 2025 19:49:16 +0000 (12:49 -0700)]
Merge tag 'vfs-6.16-rc2.fixes' of git://git./linux/kernel/git/vfs/vfs

Pull vfs fixes from Christian Brauner:

 - Fix the AT_HANDLE_CONNECTABLE option so filesystems that don't know
   how to decode a connected non-dir dentry fail the request

 - Use repr(transparent) to ensure identical layout between the C and
   Rust implementation of struct file

 - Add a missing xas_pause() into the dax code employing
   wait_entry_unlocked_exclusive()

 - Fix FOP_DONTCACHE which we disabled for v6.15.

   A folio could get redirtied and/or scheduled for writeback after the
   initial dropbehind test. Change the test accordingly to handle these
   cases so we can re-enable FOP_DONTCACHE again

* tag 'vfs-6.16-rc2.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  exportfs: require ->fh_to_parent() to encode connectable file handles
  rust: file: improve safety comments
  rust: file: mark `LocalFile` as `repr(transparent)`
  fs/dax: Fix "don't skip locked entries when scanning entries"
  iomap: don't lose folio dropbehind state for overwrites
  mm/filemap: unify dropbehind flag testing and clearing
  mm/filemap: unify read/write dropbehind naming
  Revert "Disable FOP_DONTCACHE for now due to bugs"
  mm/filemap: use filemap_end_dropbehind() for read invalidation
  mm/filemap: gate dropbehind invalidate on folio !dirty && !writeback

2 weeks agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Mon, 2 Jun 2025 19:24:58 +0000 (12:24 -0700)]
Merge tag 'for-linus' of git://git./virt/kvm/kvm

Pull more kvm updates from Paolo Bonzini:
  Generic:

   - Clean up locking of all vCPUs for a VM by using the *_nest_lock()
     family of functions, and move duplicated code to virt/kvm/. kernel/
     patches acked by Peter Zijlstra

   - Add MGLRU support to the access tracking perf test

  ARM fixes:

   - Make the irqbypass hooks resilient to changes in the GSI<->MSI
     routing, avoiding behind stale vLPI mappings being left behind. The
     fix is to resolve the VGIC IRQ using the host IRQ (which is stable)
     and nuking the vLPI mapping upon a routing change

   - Close another VGIC race where vCPU creation races with VGIC
     creation, leading to in-flight vCPUs entering the kernel w/o
     private IRQs allocated

   - Fix a build issue triggered by the recently added workaround for
     Ampere's AC04_CPU_23 erratum

   - Correctly sign-extend the VA when emulating a TLBI instruction
     potentially targeting a VNCR mapping

   - Avoid dereferencing a NULL pointer in the VGIC debug code, which
     can happen if the device doesn't have any mapping yet

  s390:

   - Fix interaction between some filesystems and Secure Execution

   - Some cleanups and refactorings, preparing for an upcoming big
     series

  x86:

   - Wait for target vCPU to ack KVM_REQ_UPDATE_PROTECTED_GUEST_STATE
     to fix a race between AP destroy and VMRUN

   - Decrypt and dump the VMSA in dump_vmcb() if debugging enabled for
     the VM

   - Refine and harden handling of spurious faults

   - Add support for ALLOWED_SEV_FEATURES

   - Add #VMGEXIT to the set of handlers special cased for
     CONFIG_RETPOLINE=y

   - Treat DEBUGCTL[5:2] as reserved to pave the way for virtualizing
     features that utilize those bits

   - Don't account temporary allocations in sev_send_update_data()

   - Add support for KVM_CAP_X86_BUS_LOCK_EXIT on SVM, via Bus Lock
     Threshold

   - Unify virtualization of IBRS on nested VM-Exit, and cross-vCPU
     IBPB, between SVM and VMX

   - Advertise support to userspace for WRMSRNS and PREFETCHI

   - Rescan I/O APIC routes after handling EOI that needed to be
     intercepted due to the old/previous routing, but not the
     new/current routing

   - Add a module param to control and enumerate support for device
     posted interrupts

   - Fix a potential overflow with nested virt on Intel systems running
     32-bit kernels

   - Flush shadow VMCSes on emergency reboot

   - Add support for SNP to the various SEV selftests

   - Add a selftest to verify fastops instructions via forced emulation

   - Refine and optimize KVM's software processing of the posted
     interrupt bitmap, and share the harvesting code between KVM and the
     kernel's Posted MSI handler"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (93 commits)
  rtmutex_api: provide correct extern functions
  KVM: arm64: vgic-debug: Avoid dereferencing NULL ITE pointer
  KVM: arm64: vgic-init: Plug vCPU vs. VGIC creation race
  KVM: arm64: Unmap vLPIs affected by changes to GSI routing information
  KVM: arm64: Resolve vLPI by host IRQ in vgic_v4_unset_forwarding()
  KVM: arm64: Protect vLPI translation with vgic_irq::irq_lock
  KVM: arm64: Use lock guard in vgic_v4_set_forwarding()
  KVM: arm64: Mask out non-VA bits from TLBI VA* on VNCR invalidation
  arm64: sysreg: Drag linux/kconfig.h to work around vdso build issue
  KVM: s390: Simplify and move pv code
  KVM: s390: Refactor and split some gmap helpers
  KVM: s390: Remove unneeded srcu lock
  s390: Remove unneeded includes
  s390/uv: Improve splitting of large folios that cannot be split while dirty
  s390/uv: Always return 0 from s390_wiggle_split_folio() if successful
  s390/uv: Don't return 0 from make_hva_secure() if the operation was not successful
  rust: add helper for mutex_trylock
  RISC-V: KVM: use kvm_trylock_all_vcpus when locking all vCPUs
  KVM: arm64: use kvm_trylock_all_vcpus when locking all vCPUs
  x86: KVM: SVM: use kvm_lock_all_vcpus instead of a custom implementation
  ...

2 weeks agoMerge tag 'm68knommu-for-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 2 Jun 2025 19:16:17 +0000 (12:16 -0700)]
Merge tag 'm68knommu-for-v6.16' of git://git./linux/kernel/git/gerg/m68knommu

Pull m68knommu updates from Greg Ungerer:

 - use new gpio line value settings

 - use strscpy() more

* tag 'm68knommu-for-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
  m68k: Replace memcpy() + manual NUL-termination with strscpy()
  m68k/kernel: replace strncpy() with strscpy()
  m68k: coldfire: gpio: use new line value setter callbacks

2 weeks agocifs: dns resolution is needed only for primary channel
Shyam Prasad N [Mon, 2 Jun 2025 17:07:16 +0000 (22:37 +0530)]
cifs: dns resolution is needed only for primary channel

When calling cifs_reconnect, before the connection to the
server is reestablished, the code today does a DNS resolution and
updates server->dstaddr.

However, this is not necessary for secondary channels. Secondary
channels use the interface list returned by the server to decide
which address to connect to. And that happens after tcon is reconnected
and server interfaces are requested.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
2 weeks agocifs: update dstaddr whenever channel iface is updated
Shyam Prasad N [Mon, 2 Jun 2025 17:07:14 +0000 (22:37 +0530)]
cifs: update dstaddr whenever channel iface is updated

When the server interface info changes (more common in clustered
servers like Azure Files), the per-channel iface gets updated.
However, this did not update the corresponding dstaddr. As a result
these channels will still connect (or try connecting) to older addresses.

Fixes: b54034a73baf ("cifs: during reconnect, update interface if necessary")
Cc: <stable@vger.kernel.org>
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2 weeks agocifs: reset connections for all channels when reconnect requested
Shyam Prasad N [Mon, 2 Jun 2025 17:07:13 +0000 (22:37 +0530)]
cifs: reset connections for all channels when reconnect requested

cifs_reconnect can be called with a flag to mark the session as needing
reconnect too. When this is done, we expect the connections of all
channels to be reconnected too, which is not happening today.

Without doing this, we have seen bad things happen when primary and
secondary channels are connected to different servers (in case of cloud
services like Azure Files SMB).

This change would force all connections to reconnect as well, not just
the sessions and tcons.

Cc: <stable@vger.kernel.org>
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2 weeks agoMerge tag 'input-for-v6.16-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 2 Jun 2025 18:14:21 +0000 (11:14 -0700)]
Merge tag 'input-for-v6.16-rc0' of git://git./linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov:

 - support for game controllers requiring delayed initialization
   packets, such as ByoWave Proteus, in xpad driver

 - a change to atkbd driver to not reset the keyboard on Loongson
   devices

 - tweaks to gpio-keys and matrix_keypad drivers

 - fixes to documentation for Amiga joysticks

 - a fix to ims-pcu driver to better handle malformed firmware

* tag 'input-for-v6.16-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: ims-pcu - check record size in ims_pcu_flash_firmware()
  Input: gpio-keys - fix possible concurrent access in gpio_keys_irq_timer()
  Input: gpio-keys - fix a sleep while atomic with PREEMPT_RT
  Input: amijoy - make headings compliant w/ guidelines in documentation
  Input: amijoy - fix grammar in documentation
  Input: amijoy - fix Amiga 4-joystick adapter pinout in documentation
  Input: amijoy - fix broken table formatting in documentation
  Input: atkbd - do not reset keyboard by default on Loongson
  Input: xpad - send LED and auth done packets to all Xbox One controllers
  Input: xpad - add the ByoWave Proteus controller
  Input: xpad - allow delaying init packets
  MAINTAINERS: update dlg,da72??.txt to yaml
  dt-bindings: input: convert dlg,da7280.txt to dt-schema
  dt-bindings: input: touchscreen: edt-ft5x06: use unevaluatedProperties
  Input: snvs_pwrkey - support power-off-time-sec
  dt-bindings: crypto: fsl,sec-v4.0-mon: Add "power-off-time-sec"
  Input: matrix_keypad - detect change during scan
  Input: matrix_keypad - add function for reading row state

2 weeks agoMerge tag 'mtd/for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
Linus Torvalds [Mon, 2 Jun 2025 18:08:17 +0000 (11:08 -0700)]
Merge tag 'mtd/for-6.16' of git://git./linux/kernel/git/mtd/linux

Pull MTD updates from Miquel Raynal:
 "A big core MTD change is the introduction of a new class to always
  register a master device. This is a problem that has been there
  forever: the "master" device was not always present depending on a
  number of heuristics such as the presence of fixed partitions and the
  absence of a Kconfig symbol to force its presence. This was a problem
  for runtime PM operations which might not have the "master" device
  available in all situation.

  The SPI NAND subsystem has seen the introduction of DTR operations
  (the equivalent of DDR transfers), which involved quite a few
  preparation patches for clarifying macro names.

  In the raw NAND subsystem, the brcmnand driver has been "fixed" for
  old legacy SoCs with an update of the ->exec_op() hook, there has been
  the introduction of a new controller driver named Loongson-1, and the
  Qualcomm driver has received quite a few misc fixes as well as a new
  compatible.

  Finally, Macornix SPI NOR entries have been cleaned-up and some SFDP
  table fixups for Macronix MX25L3255E have been merged.

  Aside from this, there is the usual load of misc improvement, fixes,
  and yaml conversion"

* tag 'mtd/for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (42 commits)
  mtd: rawnand: brcmnand: legacy exec_op implementation
  mtd: rawnand: sunxi: Add randomizer configuration in sunxi_nfc_hw_ecc_write_chunk
  mtd: nand: brcmnand: fix NAND timeout when accessing eMMC
  mtd: nand: sunxi: Add randomizer configuration before randomizer enable
  mtd: spinand: esmt: fix id code for F50D1G41LB
  mtd: rawnand: brcmnand: remove unused parameters
  mtd: core: always create master device
  mtd: rawnand: loongson1: Fix inconsistent refcounting in ls1x_nand_chip_init()
  mtd: rawnand: loongson1: Fix error code in ls1x_nand_dma_transfer()
  mtd: rawnand: qcom: Fix read len for onfi param page
  mtd: rawnand: qcom: Fix last codeword read in qcom_param_page_type_exec()
  mtd: rawnand: qcom: Pass 18 bit offset from NANDc base to BAM base
  dt-bindings: mtd: qcom,nandc: Document the SDX75 NAND controller
  mtd: bcm47xxnflash: Add error handling for bcm47xxnflash_ops_bcm4706_ctl_cmd()
  mtd: rawnand: Use non-hybrid PCI devres API
  mtd: nand: ecc-mxic: Fix use of uninitialized variable ret
  mtd: spinand: winbond: Add support for W35N02JW and W35N04JW chips
  mtd: spinand: winbond: Add octal support
  mtd: spinand: winbond: Add support for W35N01JW in single mode
  mtd: spinand: winbond: Rename DTR variants
  ...