summaryrefslogtreecommitdiff
path: root/drivers/base
AgeCommit message (Collapse)Author
37 hoursMerge tag 'mm-core-7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mm/core Pull core memory management updates from David Hildenbrand: "This includes updates to: - MEMHP (Memory Hotplug) - GUP (Get User Pages) The main change is: - Reduce zone contiguity checking overhead during memory hot(un)plug (Yuan Liu) Other changes include smaller fixes along with various cleanups" * tag 'mm-core-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mm/core: mm/memory_hotplug: fix missing rollback in __add_pages() mm/memory_hotplug: optimize zone contiguous check when changing pfn range mm/memory_hotplug: make shrink_zone_span() more robust mm/gup: honour FOLL_PIN in NOMMU __get_user_pages_locked() mm/gup_test: report actual pinned bytes mm/gup_test: safely calculate GUP batch size mm: gup: cleanup the gup_fast_*() call chain mm: gup: move pmd_protnone() into gup_fast_pmd_leaf()
3 daysMerge tag 'regmap-v7.4-2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "This is a relatively busy release, mostly due to the general cleanup work which people have been doing throughout the kernel - for regmap that's mostly been some work from Peng Fan. I also added some more tests for the sparse caches to catch some gotchas people might run into trying to improve the maple cache. - Test very high register numbers to help people avoid a nasty gotcha trying to optimise the maple cache - Make more use of scoped lock and allocation guards - A couple of other smaller improvements and fixes" * tag 'regmap-v7.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: debugfs: Use __free(kfree) for regmap_reg_ranges_read_file regmap: debugfs: Use guard to simplify code regmap: debugfs: Use __free(kfree) in regmap_name_read_file() regmap: fix potential double-free of map->reg_defaults on cache reinit regmap: use krealloc_array() in regmap_register_patch() regcache: simplify control flow and reduce nesting regcache: extract __regcache_sync() to deduplicate sync dispatch regcache: extract locked helpers to replace open-coded lock/unlock pairs regmap: debugfs: use the regmap scoped lock guard regcache: rbtree: use the regmap scoped lock guard regcache: use the regmap scoped lock guard regmap: convert lock/unlock to a scoped guard regmap: fix typo "asynchrnous" in comment regmap: Test rbtree and maple caches for very high register numbers regmap: Allow a base register to be specified for the RAM regmap
3 daysMerge tag 'driver-core-7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core Pull driver core updates from Danilo Krummrich: "Core: - Add TAINT_FORCED_BIND to taint the kernel and driver module before manual sysfs bind/unbind operations; make add_taint_module() available to driver core and update taint decoding tools and documentation - Constify device_show/store_*() attribute parameters and adapt x86 MCE and perf users to prepare for const dev_ext_attribute instances - Fix UAF in NUMA access node registration failure handling by dropping the device reference with put_device() instead of directly freeing the node debugfs: - Make debugfs_create_str() read-only to eliminate double-free races between concurrent writers; reject writable modes; convert interconnect and SoundWire users to local file operations with mutex-protected strings kobject: - Fix out-of-bounds access in kobject_action_type() when parsing action strings containing embedded NUL bytes - Fix the kobject_set_name() reference in kset_register() kernel-doc Rust: - DMA: - Tie Coherent, CoherentBox and CoherentHandle to the device's bound lifetime to prevent retaining DMA allocations beyond driver unbind; propagate the lifetime through nova-core and the DMA sample driver - I/O: - Require explicit base types for registers and replace relative registers with typed subregion projections; reimplement register!() as a proc macro, support registers using existing types without inline bitfields, and convert nova-core, Tyr and the PCI sample; add AsRepr/AsReprMut and transmute helpers with deferred size checks for representation conversions - Wrap ResourceSize in a transparent newtype with explicit conversions, including checked conversion to usize - PCI: - Add typed PCIe extended capability lookup and SR-IOV accessors for the First VF Offset and decoded VF BAR addresses and widths, keeping raw SR-IOV registers private to preserve PCI core ownership of their state - scatterlist: - Honor the device's maximum segment size as well as the DMA mapping limit when constructing SG tables - Return u32 from SGEntry::dma_len() to match the C segment length type - misc: - Validate auxiliary DeviceId name length explicitly to improve compile-time diagnostics for oversized device ID table entries - Drop unnecessary 'static bounds from debugfs ScopedDir file creation methods to support data containing non-'static references, including DMA buffers Misc: - Add Johan Hovold as driver core maintainer - Simplify platform_device_alloc() by returning early on allocation failure - Fix typos in driver core and kernfs comments" * tag 'driver-core-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core: (41 commits) rust: pci: add extended capability and SR-IOV support kobject: Fix the kobj_set_name reference in kset_register() kernel-doc rust: io: convert ResourceSize into a transparent newtype rust: scatterlist: return u32 from SGEntry::dma_len() MAINTAINERS: add myself as driver core maintainer debugfs: make debugfs_create_str() read-only soundwire: debugfs: replace writable string helper interconnect: debugfs: replace writable string helper docs: admin-guide: Handle TAINT_FORCED_BIND when parsing /proc/sys/kernel/tainted driver core: platform: Simplify platform_device_alloc() kobject: fix out-of-bounds access in kobject_action_type() rust: scatterlist: honor the device's maximum segment size driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers module: fix up documentation for add_taint() and add_taint_module() module: pull out add_taint_module() to be public driver core: Constify the signature of device_show/store_*() drivers: perf: Use __DEVICE_ATTR() macro to initialize dev_ext_attribute x86/mce: Use __DEVICE_ATTR() macro to initialize dev_ext_attribute rust: auxiliary: validate DeviceId name length driver core: fix typos in comments ...
3 daysMerge tag 'pm-7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "This time, the most visible part are the ACPI CPPC updates from Christian Loehle, including CPPC cpufreq driver changes, even though updates of cpufreq drivers proper are still the largest topic group. However, the updates of cpufreq drivers depend on the ACPI CPPC updates, so they should really be counted together and that is well over 1/2 of the total commit count. Interestingly enough, almost all of the updates included here are fixes or cleanups, with some new feature support in the amd-pstate cpufreq driver and IPQ9650 support in the qcom-nvmem cpufreq driver. The runtime PM documentation improvements from Brian Norris can also be mostly regarded as fixes, but a new kunit test goes along with them. Specifics: - Fix multiple issues related to input validation, synchronization, access safety, memory layout and register field validation, and error handling in the ACPI CPPC library (Christian Loehle and Sumit Gupta) - Select the frequency-invariance callback per CPU in the CPPC cpufreq driver and create the FIE worker before enabling PCC callbacks in it to avoid queueing work through a missing worker and dereferencing a NULL pointer (Christian Loehle) - Update the CPPC cpufreq driver entry in MAINTAINERS and add a new entry for the ACPI CPPC library (Christian Loehle) - Minor fixes in various cpufreq drivers (Alexander Koskovich, Daniel Schwierzeck, Frank Zhang, Haotian Zhang, Kathiravan Thirumoorthy, Sumeet Pawnikar, and Xueqin Luo) - Fix wrong behaviors on multi-node servers in the Loongson cpufreq driver (Huacai Chen) - Reject NULL from cpufreq_cpu_get() in the Rust code (Mehmet Koseoglu) - Add suspend OPP to mediatek cpufreq driver and DT (Ryan Brue) - Fixups for a few bugs identified by Sashiko in the amd-pstate cpufreq driver (Mario Limoncielloi, Wentao Guan) - Initial support for maximum frequency capacity handling on Zen6 client in amd-pstate (Mario Limonciello) - Fix for amd-pstate-ut with 'Requested CPU Min frequency' BIOS option (K Prateek Nayak) - New Zen6 tuning values for EPP in amd-pstate (Mario Limonciello, Vishal Badole) - amd-pstate documentation fix (Karl Mehltretter) - Restrict deferred downscaling to low load for shared policies in the conservative cpufreq governor to avoid undesirable CPU frequency reduction in some cases (Shengming Hu) - Serialize sugov_start() against rate limit updates in the schedutil cpufreq governor to avoid using a stale rate limit value (Hui Su) - Prevent cpuidle governors menu and teo from returning idle state 0 after it has been disabled (Xueqin Luo) - Replace min_t() with the better alternatives in the intel_idle driver and make it use 2-argument strscpy() (Andy Shevchenko) - Fix two repeated phrase instances in cpuidle (Hemanth Selam, Syazwina Fazrul) - Add rugged Panther Lake support to the intel_rapl power capping driver and make it use %pe for printing error pointers (Srinivas Pandruvada and Sumeet Pawnikar) - Update and improve runtime PM documentation and add a kunit test for supplier idle/suspend (Brian Norris) - Add a pm_runtime_dont_use_autosuspend() call to pm_runtime_reinit() to ensure autosuspend disabling on driver teardown (Joshua Crofts) - Ignore page-zero RAM in E820 checksum during hibernation on x86 to avoid rejecting images created after kexec() (Matthias Goergens) - Add resume event mapping for PMSG_POWEROFF to the PM core to allow it to carry out device shutdown in the future (Mario Limonciello) - Add DPM watchdog to prepare/late/early/noirq/complete phases of device suspend and resume (Mayank Rungta) - Update swsusp.txt references to swsusp.rst in hibernation documentation (Li Jun) - Fix use-after-free of perf domain in netlink doit handlers for energy models (Fan Wu) - Add synchronize_rcu() back to cpu_pm_unregister_notifier() after it was removed inadvertently in previous development cycles to avoid use-after-free (Bradley Morgan) - Unregister CPU PM notifier outside the timer lock in the timer-ti-dm clocksource driver (Bradley Morgan) - Fix typo "sucessfully" in a comment in pm_clk_add_clk() kerneldoc comment and typo "hierachy" in a comment in pm-graph (Hemanth Selam) - Fix the return value in dev_pm_opp_get_of_node() kernel-doc (Karl Mehltretter)" * tag 'pm-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (89 commits) cpufreq: loongson3: Replace IOCSR read/write with MMIO ones cpufreq: loongson3: Use global physical CPU ID in get/target callbacks cpufreq: loongson3: Replace per-package mutex with per-node cpufreq: loongson3: Adjust the width of id and val in smc_message cpufreq: loongson3: Make this driver depend on MACH_LOONGSON64 PM: runtime: Expand introduction with core concepts and structure cpufreq: schedutil: Serialize sugov_start() against rate limit updates MAINTAINERS: ACPI: Add a separate CPPC entry MAINTAINERS: cpufreq: Replace CPPC reviewer arm64: dts: mediatek: mt8173: Mark the lowest CPU OPPs for suspend cpufreq: mediatek: Enter system sleep at the suspend OPP cpufreq: qcom-cpufreq-hw: fix device node refcount leak in phandle parsing cpufreq: qcom-nvmem: Add IPQ9650 support cpufreq: Add Milos to cpufreq-dt-platdev blocklist cpufreq: Use %pe to print error pointers symbolically rust: rcpufreq_dt: add module alias cpufreq: sti: avoid NULL dereference in dev_err() cpufreq: tegra194: fix double-pointer error in get_cpu_ndiv cpufreq: sparc-us2e: fix frequency table index copy-paste error rust: cpufreq: reject NULL from cpufreq_cpu_get() ...
3 daysMerge tag 'acpi-7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI support updates from Rafael Wysocki: "The most significant change here is the rework of the core ACPI device enumeration code to avoid initializing ACPI power management prematurely for devices with unmet dependencies. This essentially is a problem fix, but it requires taking PCI device enumeration ordering into account among other things, so it is far from straightforward. There was an attempt to do this in the 7.3 time frame that had to be reverted, so this time it is done much more carefully. There is also an ACPI thermal control update rearranging the code to register thermal class cooling devices under specific parents, which is visible in sysfs. This helps to figure out what is represented by those devices much more easily, but it also allows the binding of cooling devices to trip points in thermal zones to be adjusted so it need not rely on specific cooling device data usage in thermal drivers. From the number of commits perspective, the most visible part is the one replacing acpi_get_first_physical_node() with acpi_bus_get_primary_device() everywhere and dropping the former that was inherently racy and generally unsafe to use. Fortunately, the maintainers involved responded timely and all of that could be done within one development cycle. Another quite visible part is Dave Jiang's series fixing multiple issues reported by Sashiko in the ACPI APEI support code with a PCI AER improvement on top. It took several iterations of this to make Sashiko happy and the code in question should be much more robust going forward. One other thing worth mentioning separately is that the ACPI bus type is now going to be registered as a "companion" one and it will not be possible to register a driver binding directly to a struct acpi_device. All of the existing users of those drivers in the tree were converted to platform drivers in the previous cycles, so this is just a final step in a longer journey. Apart from the above, there are many fixes, mostly in drivers, with a noticeable exception of a fix in the code binding devices to their ACPI companions, new IOVT IOMMU support in ACPICA, new _Ixx object support for suspend-to-idle on x86, multiple new quirks, mostly related to unused ACPI power resources and backlight handling, and assorted cleanups. Specifics: - Make the core ACPI device enumeration code stop attempting to initialize ACPI power management for devices before they are known to be present and functional (Rafael Wysocki) - Simplify and clean up the core ACPI device enumeration code on top of the previous adjustment and reduce debug noise coming from it (Rafael Wysocki) - Fix locking in the code binding devices to their ACPI companions, prevent it from replacing a valid ACPI companion pointer with NULL incidentally, improve its messaging (including debug noise reduction), and reduce its overhead by making it skip the cases in which no ACPI companion may exist early (Rafael Wysocki) - Reduce runtime memory footprint of struct acpi_device by rearranging fields in it (Andy Shevchenko) - Update the driver core to allow bus types without drivers to be registered as "companion bus types" without driver-related sysfs attributes and register the ACPI bus type as a companion one (Rafael Wysocki) - Use strscpy() instead of strcpy() in the ACPI sysfs interface (Ruslan Vagner) - Remove __meminitdata from hmat_adist_nb declaration preserving it even when CONFIG_MEMORY_HOTPLUG is not set to prevent notifier chain corruption in some cases (Alejandro Lucero) - Prevent a NULL pointer dereference when attempting to read the table length after a mapping bookkeeping failure during an initrd override invocation with permanent table mappings enabled (Slavin Liu) - Use for_each_populated_zone() in get_node_num() in the MRRM table pareser (Sang-Heon Jeon) - Use vsnprintf() in acpi_os_vprintf() to prevent memory corruption resulting from overly long diagnostic messages that may not fit into a static buffer used by ACPICA and may be produced by a malformed ACPI table (Vlatko Kosturjak) - Ignore leading root scope prefix in string _UID match to allow AMD IOMMU matching to work as expected in some cases (Mario Limonciello) - Adjust message printing macros for ACPI objects to use dev_fmt() for more consistency with the analogous dev_*() macros (Rafael Wysocki) - Add _Ixx GPE wake indicator support to the x86 suspend-to-idle handling code (Saranya Gopal) - Clear driver_data before free in the ACPI PCI Link driver to prevent a dangling pointer from being used later (Jiale Yao) - Accumulate the queued flag across error sections of a CPER record in ghes_do_proc() to prevent it from being cleared by a later section or entry that does not queue memory-failure work (Breno Leitao) - Map a raw PCI AER Capability image field by field to prevent information loss from occurring while processing it (Dave Jiang) - Update a stale driver source reference in the ACPI APEI EINJ driver documentation (Prabhakar Pujeri) - Reject CPER records with an out-of-range error_data_length or an error status block length wrapping a u32 in the EFI CPER driver (Dave Jiang) - Address multiple assorted issues in the ACPI extlog driver (Dave Jiang) - Address two issues related to CXL in the ACPI APEI GHES driver (Dave Jiang) - Read only validated fields in cper_mem_err_pack() (Dave Jiang) - Validate memory error section length before payload access, prevent writes past array bounds from occurring and sanitize software metadata in the ACPI APEI GHES driver (Dave Jiang) - Make cxl_cper_handle_prot_err() static (Dave Jiang) - Add IOVT IOMMU support to ACPICA (Bibo Mao) - Fix PCC OperationRegion command offsets in ACPICA (Sudeep Holla) - Fix memory leak in acpi_ds_create_field() related to the handling of internal_pcc_buffer allocations (Breno Leitao) - Fix memory leak due to leftover devm_kcalloc() argument in the ACPI fan driver (Rafael Wysocki) - Fix backlight unregistration ordering in the ACPI video bus device driver (Rafael Wysocki) - Update the thermal core to allow the registration of thermal class cooling devices under specific parents and convert the ACPI fan, ACPI processor, and ACPI video bus device drivers to do so (Rafael Wysocki) - Adjust the ACPI thermal zone driver to use thermal class cooling device parent information for binding cooling devices to trip points in thermal zones (Rafael Wysocki) - Use cooling device data that is a better match for a given driver instead of a struct acpi_device pointer that had to be used for this purpose previously in the ACPI fan and processor drivers (Rafael Wysocki) - Fix acpi_thermal_guess_offset() in the ACPI thermal zone driver for thermal zone devices with a 273.0°K offset (Hans de Goede) - Define a free for ACPI objects allocated by ACPICA helpers and use it to simplify AML error handling in the ACPI fan driver (Rafael Wysocki) - Switch over the users of acpi_get_first_physical_node(), that was inherently racy and therefore not really safe to use, to use its replacement acpi_bus_get_primary_device(), and eliminate the former (Rafael Wysocki) - Add !CONFIG_ACPI stubs for acpi_find_child_device() and acpi_device_uid() (Mario Limonciello and Robin Murphy) - Fix bogus cycle count values on systems without _BIX in the ACPI battery driver (Armin Wolf) - Fix NULL pointer dereference on allocation failure and report relative state of charge as CAPACITY in the ACPI SBS driver (Itay Shem-tov and Guangshuo Li) - Add lid_init_state quirk for Razer Blade Stealth 13 (Early 2020) RZ09-0310 to the ACPI button driver (Ian Gallagher) - Add new quirks to force the native backlight on Dell OptiPlex AIO 7410 35W and Acer Nitro AN515-58 in the ACPI video bus device driver (Chitransh Mandhaniya and Dirga Yuza) - Fix the shared memory signature handling in the ACPI PCC address space handler, free the PCC mailbox channel on operation region deactivation, and avoid unnecessary repeated computations of the PCC operation region command timeout (Sudeep Holla) - Fix a log message typo in the ACPI NUMA support code (Hemanth Selam) - Zero-initialize capability query result in the ACPI Platform Firmware Runtime Update and Telemetry driver to avoid disclosure of kernel stack data to user space (Karl Mehltretter) - Replace the remaining built-in/module check for CONFIG_ACPI_WMI in a header file with IS_ENABLED() macro (Lalit Shankar Chowdhury) - Retry probing battery docks after hotplug in the ACPI docking station driver to avoid missing ACPI add notifications (Vibhor Goel) - Detach device after resource transition failure in pnp_device_probe() to avoid blocking later manual PNP configuration attempts (Myeonghun Pak)" * tag 'acpi-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (90 commits) ACPI: PM: Add Acer Aspire A515-53G to dmi_leave_unused_power_resources_on[] ACPI: video: force native backlight on Dell OptiPlex AIO 7410 35W ACPI: PM: sleep: Drop unused sleep_no_lps0 define ACPI: PM: Add unused power resource quirk for Casper Excalibur G900 ACPI: dock: Retry probing battery docks after hotplug ACPI: PCI: pci_link: clear driver_data before free ACPI: APEI: accumulate the queued flag across error sections ACPICA: actbl2.h: Add bit constants of the Flags field in the IOVT IOMMU structure ACPI: bus: Drop acpi_get_first_physical_node() efi/dev-path-parser: Switch to use acpi_bus_get_primary_device() ALSA: hda: tas2781: Switch to use acpi_bus_get_primary_device() ALSA: hda: cs35l41: Switch to use acpi_bus_get_primary_device() iommu/arm-smmu-v3: Switch to use acpi_bus_get_primary_device() PCI/AER: Map a raw AER Capability image field by field ACPI: NUMA: fix typo in log message ACPI: Add stub for acpi_find_child_device() driver core/ACPI: Introduce companion_bus_register() ACPI: PCC: Cache OpRegion command timeout ACPI: PCC: Free channel on OpRegion deactivation ACPI: PCC: Preserve shared memory signature in OpRegion handler ...
4 daysMerge tag 'sched-core-2026-10-18' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: "Kconfig updates: - Simplify PREEMPT_DYNAMIC (Mark Rutland) Fair scheduler updates: - Remove redundant RUN_TO_PARITY check (Elif Topuz) - Declare augmented callbacks per field, fix rb_add_augmented_cached() descent (Yiwei Lin, Peter Zijlstra) - Restart fair hrtick after same-task repicks (Shubhang Kaushik) - Improve the scheduling latency of short slice tasks (Vincent Guittot) Deadline/RT scheduler updates: - Check start_dl_timer expiry with ktime_before() (Liang Hao) - irq_work: CPU-hotplug improvements on PREEMPT_RT (Sebastian Andrzej Siewior) Energy-aware scheduling updates: - Implement the steal_governor, introduce preferred CPUs and steal-driven vCPU backoff (Shrikanth Hegde) Multi-processor load-balancing updates: - Enable preferred SMT siblings on NVIDIA Olympus (Andrea Righi) - Randomize equally shallow idle CPU picks (Christian Loehle) - Remove redundant core_sched_seq (Hui Su) Cache-aware scheduling updates: - Avoid publishing partial LLC utilization (Jemmy Wong) NUMA-balancing updates: - Reset NUMA fault locality after scan period update (Eric Kim) Proxy execution updates: - Ongoing work to implement sleeping owner handling for proxy execution (John Stultz, Vasily Gorbik) - Preparatory steps to make sched_ext compatible with proxy execution (Andrea Righi) Scheduler infrastructure updates & fixes: - Remove the RCU wait from PSI trigger destruction (Shakeel Butt) - Avoid modifying wait-entry on failed priority registration (Hui Su) - Use the new static key API for sched_feat (Hongyan Xia) - Convert paravirt_steal to new static key APIs (Hongyan Xia) - cputime: Don't account idle time twice after dyntick-idle (Stian Halseth) Scheduler debugging updates: - Set TIF_NEED_RESCHED before calling __trace_set_need_resched() (Sechang Lim) - Fix context analysis errors in non-preferred CPU push (Shrikanth Hegde) Misc cleanups and fixes by Christian Loehle, Shubhang Kaushik, Thomas Huth and Vladimir Zapolskiy" * tag 'sched-core-2026-10-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (64 commits) sched: Replace nr_iowait_cpu() with a bool accessor Revert "sched/fair: Remove dead code on enqueue_task_fair()" sched/cache: Avoid publishing partial LLC utilization sched/cputime: Don't account idle time twice after dyntick-idle sched/psi: Remove the RCU wait from trigger destruction sched/eevdf: Remove redundant RUN_TO_PARITY check sched/wait: Avoid modifying entry on failed priority registration rbtree_test: Use rb_add_augmented_cached() for the cached augmented test rbtree: Update augmented data on the way down in rb_add_augmented_cached() rbtree: Declare augmented callbacks per field with RB_AUG() rbtree_test: Use rb_add() and rb_add_cached() for the basic tests smpboot: Don't park the thread if work is pending irq_work: Flush lazy work CPU down on PREEMPT_RT irq_work: Update a comment regarding CPU hotplug invocation sched/topology: Add asymmetric SMT packing override sched/fair: Honor asymmetric SMT priority in idle selection sched: Set TIF_NEED_RESCHED before calling __trace_set_need_resched() sched/core: Fix context analysis errors in non-preferred CPU push virt/steal_governor: Enable the driver virt/steal_governor: Implement steal_governor policy loop ...
5 daysMerge tag 'edac_updates_for_v7.4_rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC updates from Borislav Petkov: - Orphan several EDAC drivers: i82975x, x38, xgene, i3200. Those have been receiving just drive-by updates and no one really uses them. At least there are no traces of usage on the mailing lists. So, with the advent of AI-generated fixes frenzy, and because no one can really test fixes on those, it is time to sunset them and point them towards the eternal happy hunting-grounds - Add a dummy EDAC driver with which the EDAC core glue can be exercised in a VM for the cases where one does not necessarily have access to the hardware. This glue should be extended with all the necessary functionality that needs and can be tested this way - Add an EDAC driver to reset bitfix filters in Intel hardware. Bitfix filters are a hw mechanism for tracking stuck bits in memory and CPU arrays due to, e.g., silicon aging. Those filters can become clogged by transient errors accumulating over a long system uptime so this intel-bff (LOL :)) driver glue resets those filters on overflow. Work by Qiuxu Zhuo and Tony Luck - Export get_cpu_cacheinfo_id() for use by the new intel-bff driver - i10nm: Handle the case where hw disables memory controllers which leads to reporting the wrong memory controller when reporting an error - The now-usual AI-powered fixes and other misc cleanups and updates all over the place * tag 'edac_updates_for_v7.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: MAINTAINERS: Orphan drivers/edac/i3200_edac.c EDAC/skx_base: Fix ambiguous bitwise and logical operator style EDAC/i10nm: Fix mdev reference leak in i10nm_get_ddr_munits() MAINTAINERS: Orphan drivers/edac/xgene_edac.c MAINTAINERS: Orphan drivers/edac/x38_edac.c MAINTAINERS: Orphan drivers/edac/i82975x_edac.c EDAC/dummy: Add a dummy EDAC driver EDAC/ie31200: Disable PCI device when probing fails EDAC/{bluefield,loongson}: Use named initializers for acpi_device_id MAINTAINERS: Update Qiuxu Zhuo's email address EDAC/intel-bff: Report frequent filter overflows EDAC/intel-bff: Compute unique ID for overflowed filter EDAC/intel-bff: Reset bitfix filter when it overflows EDAC/intel-bff: Add Diamond Rapids support EDAC/intel-bff: Add stub Intel bitfix filter driver x86/mce: Add enumeration for Intel bitfix filter reset cacheinfo: Export get_cpu_cacheinfo_id() for loadable modules EDAC/i10nm: Fix Granite Rapids ADXL MC mapping
5 daysMerge tag 'vfs-7.4-rc1.misc' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull misc vfs updates from Christian Brauner: "Fixes: - aio: a keyed poll completion on an epoll instance could recurse into the same epoll waitqueue lock when the result eventfd is watched by that very instance. An unprivileged process could make a CPU spin on the recursive lock. eventfd-backed poll completions are always deferred now. - fsnotify_inoderemove() is only called once the inode is really dead, no nlink and no aliases, and open_by_handle_at() can't add an alias to a dead inode anymore. The race could crash fsnotify or lose inode mark notifications. - devtmpfs: the conversion of the public instance to ->get_tree() broke reconfiguring the shared superblock's options on later mounts which made the boot time defaults permanent. A reconfigure context is kept in fc->fs_private so the parse ops can forward options to the underlying filesystem. - ufs truncated the 64-bit directory size to an unsigned int in ufs_last_byte(). A crafted image with a 4 GiB directory produced an out-of-folio read in ufs_find_entry() and, with CONFIG_UFS_FS_WRITE, a write into an adjacent page. - devpts rejects max=0 instead of silently lifting the per-instance pty limit. The value wrapped into ida_alloc_max() and became unlimited. - fs_pin publishes pins with the rcu list helpers so the kill paths reading the lists under rcu see the initialization. - dentry_kill() reports a Tasks-RCU quiescent state. Its cond_resched() is the only reschedule point on the dentry teardown path and cond_resched() isn't a quiescent state for Tasks-RCU, so Meta kept seeing rcu_tasks stalls in btrfs subvolume deletion. - writeback sizes foreign flushes by the target wb's dirty pages instead of the memcg-wide count which over or undersized a single bdi flush. - nfsd READ emitted two fsnotify access events on the iterator path since vfs_iocb_iter_read() already sends one. A READ on a krb5i or krb5p mount showed up twice in inotify. - pipe and splice pass a poll key when waking readers and writers so epoll, poll() and select() waiters only wake for the event they asked for. - the iso8859-14 Unicode to charset tables had page01 duplicated as page1e so 29 code points mapped to the wrong bytes and 22 that aren't in the charset were accepted. - orangefs doesn't wait for an unmount service operation that never returns on system shutdown and uses ssize_t for strscpy() errors. - __register_chrdev() checks the kobject_set_name() return value. - selftest fixes: the openat2 tests hardcoded O_LARGEFILE to 0x8000 which is O_NOFOLLOW on powerpc, resolve_test makes /tmp a mountpoint so RESOLVE_NO_XDEV has a boundary to trip over, file_stressor moves into its own directory with a 30 minute timeout, the kernfs listxattr test skips when SELinux exposes security.selinux, the namespaces active reference tests wait for the thread via a PIDFD_THREAD pidfd since pthread_join() returns before exit_nsproxy_namespaces(), the idmapped_tmpfile test chowns its directory into the mapped range, the clone3 CLONE_CLEAR_SIGHAND test adds CLONE_VM so it fails for the intended reason, the pidfd PPID error message prints the values it compares and fscontext_ns gets a .gitignore. Cleanups: - vmcore prints the release of the crashed kernel from the VMCOREINFO note so a kdump that dies before the dump lands still says which kernel it was for. - initramfs allocates hardlink hash entries with the validated cpio name length instead of PATH_MAX, which put every entry in kmalloc-8k. - the unused dax_layout_busy_page() is removed, dax_layout_busy_page_range() becomes static and dax_folio_init() drops a redundant list initialization. - vfs_empty_path() is removed, it has had no callers since getname_maybe_null(). - comment and documentation fixes in aio, bpf_fs_kfuncs, fs-writeback, inode, read_write, squashfs and the vfs.rst copy of struct file_system_type" * tag 'vfs-7.4-rc1.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (38 commits) selftests/filesystems: Fix idmapped_tmpfile layer dir ownership selftests/namespaces: Wait for thread exit via pidfd in active-ref tests writeback: size foreign flushes by target wb dirty pages initramfs: Reduce hardlink hash allocation sizes fs: remove unused vfs_empty_path() dcache: report a Tasks-RCU quiescent state in dentry_kill() vmcore: report the release of the crashed kernel splice: pass a poll key when waking pipe readers and writers pipe: pass a poll key when waking writers after a resize orangefs: use ssize_t instead of size_t for error codes... orangefs_super: don't wait on service operation on system shutdown. docs/vfs: Fix the struct file_system_type copy nls: fix the Unicode to charset tables of iso8859-14 selftests/filesystems/openat2: make /tmp a mountpoint inside private namespace selftests/filesystems/openat2: fix O_LARGEFILE definitions for non-arm64 architectures fs: fix misleading comments in read_write.c squashfs: fix inode number description in documentation fs: fix typos in comments fs/dax: Make dax_layout_busy_page_range() static fs/dax: Remove unused dax_layout_busy_page() ...
6 daysregmap: Merge up fixesMark Brown
The main thing here is a fix for lockdep warnings with MMIO regmaps that use a raw spinlock and a cache, some other lockdep fixes we'd done for the benefit of the maple tree on sleeping buses meant that we were doing allocations for those MMIO regmaps under a raw spinlock. While fixing that Michael Reeves also noticed that the debugfs files were briefly available without the cache structures backing them. There's also a fix for interrupt freeing on error in regmap-irq which had been hanging around because it's not super urgent.
6 daysMerge branches 'pm-sleep', 'pm-em', 'pm-cpu', 'pm-misc' and 'pm-tools'Rafael J. Wysocki
Merge updates related to system sleep, an energy model handling update, a generic CPU PM driver update, a clock framework PM update, and a pm-graph utility update for 7.4: - Ignore page-zero RAM in E820 checksum during hibernation on x86 to avoid rejecting images created after kexec() (Matthias Goergens) - Add resume event mapping for PMSG_POWEROFF to the PM core to allow it to carry out device shutdown in the future (Mario Limonciello) - Add DPM watchdog to prepare/late/early/noirq/complete phases of device suspend and resume (Mayank Rungta) - Update swsusp.txt references to swsusp.rst in hibernation documentation (Li Jun) - Fix use-after-free of perf domain in netlink doit handlers for energy models (Fan Wu) - Add synchronize_rcu() back to cpu_pm_unregister_notifier() after it was removed inadvertently in previous development cycles to avoid use-after-free (Bradley Morgan) - Unregister CPU PM notifier outside the timer lock in the timer-ti-dm clocksource driver (Bradley Morgan) - Fix typo "sucessfully" in a comment in pm_clk_add_clk() kerneldoc comment and typo "hierachy" in a comment in pm-graph (Hemanth Selam) * pm-sleep: x86/hibernate: Ignore page-zero RAM in E820 checksum PM: sleep: Add resume event mapping for PMSG_POWEROFF PM: sleep: Add DPM watchdog to prepare/late/early/noirq/complete phases PM: hibernate: docs: update swsusp.txt references to swsusp.rst * pm-em: PM: EM: Fix use-after-free of perf domain in netlink doit handlers * pm-cpu: PM: CPU: Restore synchronize_rcu() to cpu_pm_unregister_notifier() clocksource/drivers/timer-ti-dm: Unregister CPU PM notifier outside of the timer lock * pm-misc: PM: clk: fix typo "sucessfully" in comment * pm-tools: tools: power: pm-graph: fix typo "hierachy" in comment
6 daysMerge branch 'pm-runtime'Rafael J. Wysocki
Merge updates related to runtime PM for 7.4: - Update and improve runtime PM documentation and add a kunit test for supplier idle/suspend (Brian Norris) - Add a pm_runtime_dont_use_autosuspend() call to pm_runtime_reinit() to ensure autosuspend disabling on driver teardown (Joshua Crofts) * pm-runtime: PM: runtime: Expand introduction with core concepts and structure PM: runtime: Clarify driver callback expectations and structure Section 2 PM: runtime: Clarify ->runtime_idle() callback return value handling PM: runtime: Add "Section" hyperlinks PM: runtime: Misc improvements to runtime_pm.rst PM: runtime: More kerneldoc formatting PM: runtime: Correct pm_runtime_autosuspend_expiration() doc PM: runtime: call pm_runtime_dont_use_autosuspend() on reinit() PM: core: Document struct dev_pm_info with kerneldoc PM: runtime: Pull API docs from kerneldoc PM: runtime: kerneldoc wording improvements PM: runtime: Improve set_{status,active,suspended} docs PM: runtime: kerneldoc fixes PM: runtime: Add kunit test for supplier idle/suspend PM: runtime: Only queue an idle check for RPM-linked suppliers
9 daysMerge branches 'acpi-scan', 'acpi-glue', 'acpi-bus' and 'acpi-sysfs'Rafael J. Wysocki
Merge ACPI support infrastructure changes for 7.4: - Make the core ACPI device enumeration code stop attempting to initialize ACPI power management for devices before they are known to be present and functional (Rafael Wysocki) - Simplify and clean up the core ACPI device enumeration code on top of the previous adjustment and reduce debug noise coming from it (Rafael Wysocki) - Fix locking in the code binding devices to their ACPI companions, prevent it from replacing a valid ACPI companion pointer with NULL incidentally, improve its messaging (including debug noise reduction), and reduce its overhead by making it skip the cases in which no ACPI companion may exist early (Rafael Wysocki) - Reduce runtime memory footprint of struct acpi_device by rearranging fields in it (Andy Shevchenko) - Update the driver core to allow bus types without drivers to be registered as "companion bus types" without driver-related sysfs attributes and register the ACPI bus type as a companion one (Rafael Wysocki) - Use strscpy() instead of strcpy() in the ACPI sysfs interface (Ruslan Vagner) * acpi-scan: ACPI: scan: Combine two conditionals in acpi_bus_attach() ACPI: PM: Move acpi_bus_init_power() declaration to internal header file ACPI: scan: Stop calling acpi_bus_init_power() early ACPI: PM: Drop parent state update from acpi_device_get_power() ACPI: scan: Drop useless and noisy debug statement * acpi-glue: ACPI: glue: Skip devices with no type in acpi_device_notify() ACPI: glue: Fix up and adjust acpi_unbind_one() ACPI: glue: Rearrange acpi_bind_one() to avoid breakage ACPI: glue: Carry out companion lookup under bus_type_sem ACPI: glue: Rework the success message in acpi_device_notify() ACPI: glue: Reduce debug noise from acpi_device_notify() * acpi-bus: driver core/ACPI: Introduce companion_bus_register() ACPI: bus: Reduce runtime memory footprint of struct acpi_device * acpi-sysfs: ACPI: sysfs: use strscpy() instead of strcpy()
12 daysMerge branch 'tip/sched/urgent'Peter Zijlstra
Pickup dependencies; notably the RB-tree fix. Signed-off-by: Peter Zijlstra <peterz@infradead.org>
12 daysregmap: Fix cache lifecycle locking and teardownMark Brown
Michael Reeves <michael.reeves077@gmail.com> says: Fix an "Invalid wait context" lockdep warning during Apple GPIO probe and correct debugfs ordering during cache teardown. Tested on Apple M3 MacBook Air (T8122): - All 4 GPIO controllers probe successfully with lockdep enabled. - The "Invalid wait context" warning no longer occurs. - The regmap KUnit suite passes and lockdep remains enabled. Link: https://patch.msgid.link/20261006-regcache-lifecycle-submit-v3-0-37bdd82fd47c@gmail.com
12 daysregmap: Drop map lock during cache init and exitMichael Reeves
On systems with CONFIG_PROVE_RAW_LOCK_NESTING enabled, Apple GPIO probe triggers an "Invalid wait context" lockdep warning. The driver uses a regmap with a raw spinlock and REGCACHE_FLAT. During regcache_init(), regcache_flat_init() allocates memory while holding the raw spinlock. The memory allocator can acquire a non-raw spinlock, which causes an invalid raw-to-non-raw lock nesting error. The abbreviated call chain is: apple_gpio_pinctrl_probe regcache_init regcache_flat_init __kmalloc_noprof __pcs_replace_empty_main refill_objects _raw_spin_lock_irqsave Cache allocation occurs before the regmap is published, cache destruction occurs after users have stopped accessing it, and regmap_reinit_cache() requires callers to prevent concurrent access. Remove the outer map lock from cache initialization and destruction. Keep it for cache population and normal register access. The Maple cache still uses its internal spinlock during teardown. That lock can also be acquired from hard IRQ context during register access. Add Maple-state irqsave helpers and use them during teardown to preserve the lock's IRQ-safe lockdep state. Fixes: fd4ebc07b4df ("regmap: Hold the regmap lock when allocating and freeing the cache") Suggested-by: Mark Brown <broonie@kernel.org> Suggested-by: Liam R. Howlett <liam@infradead.org> Signed-off-by: Michael Reeves <michael.reeves077@gmail.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20261006-regcache-lifecycle-submit-v3-2-37bdd82fd47c@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
12 daysregmap: Remove debugfs before cache teardownMichael Reeves
regmap_exit() and regmap_reinit_cache() destroy the register cache before removing debugfs. A concurrent debugfs cache operation can therefore access cache state after the backend exit callback starts freeing it. Remove debugfs before cache teardown, and clear the debugfs pointer after removal. During cache reinitialization, recreate debugfs only after the new cache initializes successfully. Signed-off-by: Michael Reeves <michael.reeves077@gmail.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20261006-regcache-lifecycle-submit-v3-1-37bdd82fd47c@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-10-08regmap: debugfs: Use __free(kfree) for regmap_reg_ranges_read_filePeng Fan
Convert buf and entry in regmap_reg_ranges_read_file() from manual kfree() to __free(kfree) scope-based cleanup. This eliminates the goto error path and the manual kfree(buf) on entry allocation failure, simplifying the function to use straight-line returns. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20261008-regmap-debugfs-fix-v1-1-3df2f25c01b6@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-10-06regmap: debugfs: Use guard to simplify codePeng Fan
Replace open-coded mutex_lock()/unlock() pairs with guard() and scoped_guard() across the debugfs code. - regmap_debugfs_get_dump_start(): guard(mutex) replaces three unlock sites (kzalloc failure, cache hit, end-of-function). - regmap_next_readable_reg(): early return for the common case and scoped_guard for the cache fallback path. - regmap_reg_ranges_read_file(): scoped_guard wraps the cache iteration loop. - regmap_debugfs_init(): scoped_guard for single list_add. - regmap_debugfs_exit(): flatten if/else into early return and scoped_guard for the early-list cleanup. - regmap_debugfs_initcall(): guard(mutex) held to function end. No functional change. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20261002-regmap-lock-2nd-v2-7-e172b0501c52@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-10-06regmap: debugfs: Use __free(kfree) in regmap_name_read_file()Peng Fan
Use the __free(kfree) cleanup helper for the temporary buffer allocated by regmap_name_read_file(). Remove the explicit kfree() calls from the error and success paths. No functional change. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20261002-regmap-lock-2nd-v2-6-e172b0501c52@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-10-06regmap: fix potential double-free of map->reg_defaults on cache reinitPeng Fan
regcache_exit() frees map->reg_defaults but does not NULL the pointer. If regmap_reinit_cache() is later called with a config that has neither reg_defaults nor num_reg_defaults_raw, regcache_init() skips both allocation branches and leaves the stale pointer in place. Should cache_ops->init then fail, the err_free_reg_defaults error path calls kfree(map->reg_defaults) a second time. NULL the pointer after freeing so the error-path kfree() is a harmless no-op. Assisted-by: LLM Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20261002-regmap-lock-2nd-v2-5-e172b0501c52@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-10-06regmap: use krealloc_array() in regmap_register_patch()Peng Fan
Replace krealloc() with krealloc_array() in regmap_register_patch() to gain the built-in overflow check on the element-count * element-size multiplication, and switch to the early-return error style to reduce nesting. Assisted-by: LLM Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20261002-regmap-lock-2nd-v2-4-e172b0501c52@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-10-06regcache: simplify control flow and reduce nestingPeng Fan
Move the count guard into regcache_hw_init() so callers don't need to check before calling, and flatten conditional blocks that wrap a single call by using early returns instead. Merge the two separate reg_defaults / num_reg_defaults sanity checks into a single expression, and drop unnecessary else-after-return in regcache_lookup_reg() and regcache_sync_block(). No functional change. Assisted-by: LLM Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20261002-regmap-lock-2nd-v2-3-e172b0501c52@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-10-06regcache: extract __regcache_sync() to deduplicate sync dispatchPeng Fan
regcache_sync() and regcache_sync_region() both open-code the same pattern: check cache_dirty, then dispatch to either cache_ops->sync() or regcache_default_sync(). Extract this into a static __regcache_sync() helper that both callers share. The helper checks cache_dirty and returns 0 early when the cache is clean, dispatches to the backend sync callback when present, and falls back to regcache_default_sync() otherwise. In regcache_sync_region(), the cache_dirty early-exit previously skipped setting map->async. With the helper, map->async is set to true before the call and restored to false unconditionally afterward, so when cache_dirty is false the flag is toggled and immediately restored - functionally equivalent. No functional change. Assisted-by: LLM Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20261002-regmap-lock-2nd-v2-2-e172b0501c52@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-10-06regcache: extract locked helpers to replace open-coded lock/unlock pairsPeng Fan
The previous patch ("regcache: use the regmap scoped lock guard") deliberately left regcache_init() with explicit map->lock()/unlock() calls because the function has a goto err_* cleanup ladder and mixing goto with cleanup helpers in the same function is discouraged by cleanup.h. Solve this by extracting two static helpers: regcache_locked_op() - acquires the regmap lock via guard(regmap), invokes an int-returning cache_ops callback (init, populate), and returns its result. Returns 0 when the callback is NULL. regcache_locked_exit() - acquires the regmap lock via guard(regmap) and invokes the void-returning exit callback. Returns immediately when the callback is NULL. Because the lock scope is now entirely inside the helper functions, it never crosses a goto target in the caller, so the cleanup.h concern does not apply. Convert all four remaining open-coded lock/unlock sites in regcache_init() (init, populate, error-path exit) and the scoped_guard in regcache_exit() to use these helpers. No functional change. Assisted-by: LLM Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20261002-regmap-lock-2nd-v2-1-e172b0501c52@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-09-30PM: sleep: Add resume event mapping for PMSG_POWEROFFMario Limonciello (AMD)
PM_EVENT_POWEROFF (0x0800) and PMSG_POWEROFF were already defined in include/linux/pm.h, and pm_op(), pm_late_early_op() and pm_noirq_op() already dispatch PM_EVENT_POWEROFF to the same ops->poweroff*() callbacks as PM_EVENT_HIBERNATE. Add the matching entry to resume_event() so that when a poweroff suspend sequence is aborted (for example a device's ->poweroff_noirq() callback fails and the PM core rolls the already-suspended devices back), those devices are resumed with PMSG_RESTORE and their ->restore*() callbacks run. Map it to PMSG_RESTORE, mirroring the existing PM_EVENT_HIBERNATE handling. This is correct because both events suspend via ops->poweroff*(), whose counterpart is ops->restore*(). Mapping to PMSG_ON would be a no-op: it is what the default return already yields, and pm_op()/pm_late_early_op()/pm_noirq_op() have no PM_EVENT_ON case, so they would return NULL and silently skip every resume callback on the abort path. This completes the PMSG_POWEROFF infrastructure needed to support differentiating between hibernation and shutdown sequences when re-using callbacks for common code. Hibernation is started by writing a hibernation method (such as 'platform' 'shutdown', or 'reboot') to use into /sys/power/disk and writing 'disk' to /sys/power/state. Shutdown is initiated with the reboot() syscall with arguments on whether to halt the system or power it off. Tested-by: Eric Naim <dnaim@cachyos.org> Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org> [ rjw: Subject tweak ] Link: https://patch.msgid.link/20260926225555.2916525-1-mario.limonciello@amd.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-09-30PM: runtime: More kerneldoc formattingBrian Norris
In taking another pass at these docs, I found some more inconsistencies. Signed-off-by: Brian Norris <briannorris@chromium.org> Link: https://patch.msgid.link/20260929194956.v3.2.Ia1cae8a40a24662df11553c225f4438eab65b7db@changeid Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-09-30PM: runtime: Correct pm_runtime_autosuspend_expiration() docBrian Norris
The "adjusted to be nonzero" comment may be a relic from when this API previously used jiffies, although I'm not quite sure about that either. In any case, it doesn't seem correct today. Signed-off-by: Brian Norris <briannorris@chromium.org> Link: https://patch.msgid.link/20260929194956.v3.1.Ifc8b2d1742729cc82f46220d85c6382fdee1fc8b@changeid Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-09-28regmap: convert map->lock/unlock users to a scoped guardMark Brown
Peng Fan (OSS) <peng.fan@oss.nxp.com> says: The regmap lock is taken by calling the lock and unlock callbacks directly at every call site: map->lock(map->lock_arg); ... map->unlock(map->lock_arg); The open-coded pattern forces every error path to unlock by hand, which spreads goto out_unlock chains and duplicated unlock statements throughout regmap.c and regcache.c and makes it easy to leak the lock on a newly added return path. Define a scoped guard for the regmap lock (DEFINE_GUARD) in internal.h and convert the users to it. The lock and unlock callbacks are chosen at init time (mutex, spinlock, raw spinlock, hwspinlock or none) and return void, so an unconditional guard is sufficient. Function-scope critical sections use guard(regmap)(); sites that must run work after the lock is dropped - for example regmap_register_patch() calling regmap_async_complete() and the debugfs cache_only handler calling regcache_sync() (which takes the lock itself) - use scoped_guard(regmap, ...) so the trailing work stays outside the guarded region. regcache_sync() and regcache_sync_region() are deliberately left unconverted: they already use a single goto out unlock path, so a guard would save nothing while forcing either a goto inside a scoped_guard scope or a control-flow rewrite, neither of which is an improvement. This patchset removes many manual unlock statements together with the associated goto out_unlock labels. The series is split to keep the regcache: and regmap: changes on their own commits and to preserve independent revertibility: 1. define the guard and convert regmap.c 2. convert regcache.c (except the sync helpers, see above) 3. convert the regcache rbtree debugfs dump 4. convert the regmap debugfs write handlers No functional change. Tested with the regmap KUnit suite (drivers/base/regmap/regmap-kunit.c) under ARCH=um: 551/551 tests pass, and 551/551 again with lockdep (PROVE_LOCKING, DEBUG_LOCK_ALLOC, DEBUG_ATOMIC_SLEEP) enabled with no splats. Built clean with sparse (C=1) showing no lock-context imbalance warnings. Link: https://patch.msgid.link/20260924-regmap-lock-guard-v3-0-8a6127223c16@nxp.com
2026-09-28regmap: debugfs: use the regmap scoped lock guardPeng Fan
Convert the open-coded map->lock()/map->unlock() users in the debugfs cache_only and cache_bypass write handlers to the regmap scoped guard. regmap_cache_bypass_write_file() uses guard(regmap)() since the locked region runs to the return. regmap_cache_only_write_file() uses scoped_guard(regmap, ...) because the subsequent regcache_sync() must run with the lock released - it takes the regmap lock itself - so it stays outside the guarded scope exactly as before. No functional change. Assisted-by: LLM Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20260924-regmap-lock-guard-v3-4-8a6127223c16@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-09-28regcache: rbtree: use the regmap scoped lock guardPeng Fan
Convert the open-coded map->lock()/map->unlock() pair in rbtree_show() to guard(regmap)(). The locked region spans the whole function body up to the single return, so a function-scope guard drops the manual unlock with no functional change. Assisted-by: LLM Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20260924-regmap-lock-guard-v3-3-8a6127223c16@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-09-28regcache: use the regmap scoped lock guardPeng Fan
Convert the open-coded map->lock()/map->unlock() users in regcache.c to the regmap scoped guard introduced for regmap.c. Use scoped_guard(regmap, ...) in regcache_exit(), where the locked region is a subsection of the function, and guard(regmap)() for the function-scope critical sections. regcache_init() keeps explicit map->lock()/map->unlock() calls: it has a goto err_* cleanup ladder and mixing goto with cleanup helpers in the same function is not allowed by cleanup.h. regcache_sync() and regcache_sync_region() are left as-is: they already use a single goto out unlock path, so converting them would require either mixing a goto with a scoped_guard scope or restructuring their control flow, neither of which is an improvement. No functional change. Assisted-by: LLM Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20260924-regmap-lock-guard-v3-2-8a6127223c16@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-09-28regmap: convert lock/unlock to a scoped guardPeng Fan
The regmap lock and unlock callbacks are invoked directly as map->lock(map->lock_arg) / map->unlock(map->lock_arg) at every call site. This open-coded pattern requires manual unlocking on every return path, which spreads goto out_unlock chains and duplicated unlock statements throughout the code and is an easy place to leak the lock on an error path. Define a scoped guard for the regmap lock in internal.h. The lock and unlock callbacks are chosen at init time (mutex, spinlock, raw spinlock, hwspinlock or none) and return void, so an unconditional DEFINE_GUARD() is sufficient. Convert all lock/unlock users in regmap.c to guard(regmap)() for function-scope critical sections and scoped_guard(regmap, ...) where work must run outside the lock (e.g. regmap_register_patch() calling regmap_async_complete()). This drops every manual unlock and the associated goto out_unlock labels with no functional change. Assisted-by: LLM Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20260924-regmap-lock-guard-v3-1-8a6127223c16@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-09-28sysfs: Add preferred CPU fileShrikanth Hegde
Add a "preferred" file in /sys/devices/system/cpu/ when kernel is built with CONFIG_PREFERRED_CPU=y. This would help - Users to quickly check which CPUs are marked as preferred. - Userspace daemons such as irqbalance to use this mask to route irqs into preferred CPUs. For example: cat /sys/devices/system/cpu/online 0-719 cat /sys/devices/system/cpu/preferred 0-599 <<< Implies 0-599 are preferred for workloads and 600-719 should be avoided at this moment. cat /sys/devices/system/cpu/preferred 0-719 <<< All CPUs are usable. There is no preference. Signed-off-by: Shrikanth Hegde <sshegde@linux.ibm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20260928053728.797539-6-sshegde@linux.ibm.com
2026-09-28Merge tag 'v7.3-rc5' into driver-core-nextDanilo Krummrich
We need the driver-core fixes in here as well to build on top of. Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-09-26driver core: platform: Simplify platform_device_alloc()Cezary Rojewski
There is no need to double check the 'pa' object. Reviewed-by: Dawid Osuchowski <dawid.osuchowski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Vishal Moola (Fractile) <vishal.moola@gmail.com> Link: https://patch.msgid.link/20260925093928.3765486-1-cezary.rojewski@intel.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-09-25PM: runtime: call pm_runtime_dont_use_autosuspend() on reinit()Joshua Crofts
Add a pm_runtime_dont_use_autosuspend() call to pm_runtime_reinit() to ensure autosuspend is disabled on driver teardown. Suggested-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com> Link: https://patch.msgid.link/20260919-move-dont-use-autosuspend-v1-1-f6e2d1315c23@gmail.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-09-25PM: clk: fix typo "sucessfully" in commentHemanth Selam
Correct "sucessfully" to "successfully", reported by scripts/checkpatch.pl using the misspelling list in scripts/spelling.txt. Only touches comments, no code changes. Signed-off-by: Hemanth Selam <hemanth.selam@gmail.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> [ rjw: Subject adjustment ] Link: https://patch.msgid.link/20260907064725.10686-2-hemanth.selam@gmail.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-09-25PM: sleep: Add DPM watchdog to prepare/late/early/noirq/complete phasesMayank Rungta
Extend the DPM watchdog to wrap device_prepare, device_suspend_late, device_suspend_noirq, device_resume_noirq, device_resume_early, and device_complete callbacks. If a driver hangs during these transitions, the watchdog will fire and dump a stack trace to help identify the offending driver. To prevent false-positive timeouts, the watchdog is set only after waiting for subordinate (during suspend) and superior (during resume) devices. With this change, DPM watchdog coverage is extended across all phases of system sleep transitions. Signed-off-by: Mayank Rungta <mrungta@google.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org> Link: https://patch.msgid.link/20260909224818.2177311-1-mrungta@google.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-09-25driver core/ACPI: Introduce companion_bus_register()Rafael J. Wysocki
The ACPI bus type does not allow drivers to be matched to devices, so the sysfs attributes related to drivers created for it are useless and their existence is confusing. Moreover, it is better to prevent drivers from being registered and looked up for a bus like that. To allow skipping the creation of those sysfs attributes and preventing driver registration and lookup for the ACPI bus type, introduce a "companion" bus type concept and add a special registration function for registering "companion" bus types, companion_bus_register(). The "drivers" directory under the ACPI bus type is still needed because there are versions of systemd that depend on it [1]. Link: https://lore.kernel.org/linux-acpi/SN6PR02MB41575266A4580339E186E5D9D4812@SN6PR02MB4157.namprd02.prod.outlook.com/ [1] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Danilo Krummrich <dakr@kernel.org> Tested-by: Michael Kelley <mhklinux@outlook.com> Reviewed-by: Michael Kelley <mhklinux@outlook.com> [ rjw: Add comment regarding drivers_kset creation in bus_register_internal() ] Link: https://patch.msgid.link/12985239.O9o76ZdvQC@rafael.j.wysocki Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-09-23mm/memory_hotplug: optimize zone contiguous check when changing pfn rangeYuan Liu
When move_pfn_range_to_zone() or remove_pfn_range_from_zone() updates a zone, set_zone_contiguous() rescans the entire zone pageblock-by-pageblock to rebuild zone->contiguous. For large zones this is a significant cost during memory hotplug and hot-unplug. Add a new zone member, pages_with_online_memmap, that tracks the number of pages within the zone span that have an online memory map, including present pages and memory holes whose memory map has been initialized and for which pfn_to_online_page() succeeds. For early boot memory, pages_with_online_memmap is calculated in memmap_init_zone_range(). PFNs initialized by memmap_init_range() are included in pages_with_online_memmap, and hole PFNs for which pfn_to_online_page() succeeds are also counted in init_unavailable_range(). For hotplugged memory, pages_with_online_memmap is updated through adjust_present_page_count(), which is called during memory online and offline operations. When spanned_pages == pages_with_online_memmap, every PFN in the zone span has a valid memmap entry, so pfn_to_page() can be called for any PFN within the zone span without an additional pfn_valid() check. Note: this counter may temporarily undercount when pages with an online memory map exist outside the current zone span. Such pages are only created during boot, when initializing the memory map of pages that do not fall into any zone span. The undercount itself can only happen after boot, during memory hotplug, when growing the zone to cover such pages and later shrinking it back, which may result in a "too small" value. This is safe: it merely prevents detecting a contiguous zone. Here is an example (page numbers are just for illustration purposes): after boot: [ zone span ] [ zone pages ] spanned=10, initialized=15, online=10 online == spanned -> contiguous growing after hotplug (hotplug 5): [ zone span ] [ zone pages ] [ zone pages ] spanned=30, initialized=20, online=15 online != spanned -> not contiguous shrinking after hotunplug (hotunplug 5 again): [ zone span ] [ zone pages ] spanned=15, initialized=15, online=10 online != spanned -> not contiguous although contiguous The contiguity check using pages_with_online_memmap is stricter than the old pageblock-by-pageblock scan. The old set_zone_contiguous() iterated at pageblock granularity via pageblock_pfn_to_page(), so a zone could be marked contiguous even if a subsection-sized hole existed within a pageblock. The new check requires spanned_pages == pages_with_online_memmap, meaning every PFN in the zone span must satisfy pfn_to_online_page(). The following test cases of memory hotplug for a VM [1], tested in the environment [2], show that this optimization can significantly reduce the memory hotplug time [3]. +----------------+------+---------------+--------------+----------------+ | | Size | Time (before) | Time (after) | Time Reduction | | +------+---------------+--------------+----------------+ | Plug Memory | 256G | 10s | 3s | 70% | | +------+---------------+--------------+----------------+ | | 512G | 36s | 7s | 81% | +----------------+------+---------------+--------------+----------------+ +----------------+------+---------------+--------------+----------------+ | | Size | Time (before) | Time (after) | Time Reduction | | +------+---------------+--------------+----------------+ | Unplug Memory | 256G | 11s | 4s | 64% | | +------+---------------+--------------+----------------+ | | 512G | 36s | 9s | 75% | +----------------+------+---------------+--------------+----------------+ [1] Qemu commands to hotplug 256G/512G memory for a VM: object_add memory-backend-ram,id=hotmem0,size=256G/512G,share=on device_add virtio-mem-pci,id=vmem1,memdev=hotmem0,bus=port1 qom-set vmem1 requested-size 256G/512G (Plug Memory) qom-set vmem1 requested-size 0G (Unplug Memory) [2] Hardware : Intel Icelake server Guest Kernel : v7.3-rc3 Qemu : v9.0.0 Launch VM : qemu-system-x86_64 -accel kvm -cpu host \ -drive file=./Centos10_cloud.qcow2,format=qcow2,if=virtio \ -drive file=./seed.img,format=raw,if=virtio \ -smp 3,cores=3,threads=1,sockets=1,maxcpus=3 \ -m 2G,slots=10,maxmem=2052472M \ -device pcie-root-port,id=port1,bus=pcie.0,slot=1,multifunction=on \ -device pcie-root-port,id=port2,bus=pcie.0,slot=2 \ -nographic -machine q35 \ -nic user,hostfwd=tcp::3000-:22 Guest kernel auto-onlines newly added memory blocks: echo online > /sys/devices/system/memory/auto_online_blocks [3] The time from typing the QEMU commands in [1] to when the output of 'grep MemTotal /proc/meminfo' on Guest reflects that all hotplugged memory is recognized. Reported-by: Nanhai Zou <nanhai.zou@intel.com> Reported-by: Chen Zhang <zhangchen.kidd@jd.com> Tested-by: Yuan Liu <yuan1.liu@intel.com> Reviewed-by: Jason Zeng <jason.zeng@intel.com> Reviewed-by: Chen Yu <yu.c.chen@intel.com> Reviewed-by: Pan Deng <pan.deng@intel.com> Co-developed-by: Tianyou Li <tianyou.li@intel.com> Signed-off-by: Tianyou Li <tianyou.li@intel.com> Signed-off-by: Yuan Liu <yuan1.liu@intel.com> Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Reviewed-by: Wei Yang <richard.weiyang@gmail.com> Link: https://patch.msgid.link/20260920084946.3266279-3-yuan1.liu@intel.com Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
2026-09-22sched/cache: Refresh LLC capacity across CPU hotplug, to fix capacity ↵Davi Chaves Azevedo
underestimation bug The scheduler scales LLC capacity by the fraction of cache-sharing CPUs covered by a domain: llc_bytes = cache_size * span_weight / shared_weight During CPU teardown, sched_cpu_deactivate() rebuilds scheduler domains before cacheinfo_cpu_pre_down() removes the CPU from shared_cpu_map. The new domains therefore use the old sharing weight. The later call to sched_update_llc_bytes() looks up the departing CPU's sd_llc, which has already been detached, and returns without correcting the surviving CPUs. On a Ryzen 5 7535U with twelve logical CPUs sharing a 16 MiB LLC, offlining one SMT sibling left the remaining CPUs with: llc_bytes = floor(16777216 * 11 / 12) = 15379114 bytes The correct capacity is still 16777216 bytes. On systems with active cache-aware scheduling, an underestimated capacity can cause exceed_llc_capacity() to reject aggregation for a process whose footprint would fit. Unchanged cpuset partitions sharing the physical cache can also retain stale capacity when a CPU comes online in another partition. Pass the cache-sharing mask already retained by cacheinfo to the scheduler update. Refresh every surviving CPU using its own LLC domain so that each partition receives the correct share. This also preserves the correction needed as cache-sharing maps grow during boot. Keep the existing CPU-hotplug and scheduler-domain synchronization. The update remains on the hotplug path; no steady-state scheduling operation or persistent allocation is added. Fixes: 7030513a0877 ("sched/cache: Calculate the LLC size and store it in sched_domain") Signed-off-by: Davi Chaves Azevedo <davichazbh@gmail.com> Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Chen Yu <yu.c.chen@intel.com> Reviewed-by: Tim Chen <tim.c.chen@linux.intel.com> Reviewed-by: K Prateek Nayak <kprateek.nayak@amd.com> Tested-by: Chen Yu <yu.c.chen@intel.com> Tested-by: K Prateek Nayak <kprateek.nayak@amd.com> Cc: <stable@kernel.org> # v7.2.x Link: https://patch.msgid.link/6751d93e15889e624796c74db0bfe66603d60b1b.1790035273.git.tim.c.chen@linux.intel.com
2026-09-18driver core: add TAINT_FORCED_BIND for when userspace manually messes with ↵Greg Kroah-Hartman
devices and drivers The ability to add and remove devices from a driver through the sysfs "bind" and "unbind" files was created all those decades ago as a way that kernel developers can iterate faster, and provide a debugging way for users to attempt to add a new device to a driver without having to rebuild their kernel. This api over the years has been abused and recently come under a major fuzzing "attack" through tools like syzbot which decided that it would attempt to just randomly bind any driver to any type of device, causing loads of unneeded errors and pointless kernel patches to be generated by unsuspecting new developers. Handle all of this by adding a new taint flag, TAINT_FORCED_BIND, which will be set on the driver if the bind/unbind sysfs files are ever written to. This lets kernel developers "know" that a user is attempting to do something that is not normal, and as such, if the kernel breaks they get to keep the shiny pieces laying around on the floor. The flag is 'Y' which was unused, and can remembered as the user is "yeeting" the device being operated on here (thrown with force without regard for the thing being thrown). Note, the taint flag gets set _BEFORE_ the bind/unbind callback happens, as many times crashes/oops/warnings/failures happen within the callback, and the taint flag needs to be there to show what was being attempted. If it were to be set after the callback happens, the oops report would not properly reflect what foolishness was being attempted. Fuzzing tools like syzbot, that doesn't have hand-crafted rules to keep the tool from hitting bind/unbind, should be run with panic_on_taint enabled so that they fall over and don't continue on, thinking that they actually found a real issue. Userspace operations that rely on the bind/unbind files to work around the lack of will to upgrade a kernel image to a newer version with proper support for new devices, or the lack of will to submit valid device ids to driver authors, will still work properly, but now the kernel will be flagged in a way that will show that perhaps those users should reconsider their behavior and work to have the drivers properly support these devices in a "native" manner. Finally, the bind/unbind files can find real use-after-free issues with some drivers by forcing the process to happen virtually without having to rely on manual removal processes. Those real bugs should still be worked on, but by adding this taint flag, developers can more easily determine bug reports that are actually worth looking at. Reviewed-by: Johan Hovold <johan@kernel.org> Tested-by: Johan Hovold <johan@kernel.org> Reviewed-by: Aaron Tomlin <atomlin@atomlin.com> Reviewed-by: Bradley Morgan <brads@mainlining.org> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260914-bind_taint-v4-3-eadf8a090903@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-09-17PM: runtime: kerneldoc wording improvementsBrian Norris
In preparation for removing duplicate documentation from Documentation/power/runtime_pm.rst, borrow some of the useful wording from runtime_pm.rst, and update other language for clarity, ease of reading, and completeness. Other guiding principles in this change: * Try to highlight "core", as in, "functions that are not for driver use but are exported because the real entrypoints are inline functions" * Rework pm_runtime_barrier() docs significantly. More below. * Include some clarifying cross-references and recommendations for pm_runtime_put_sync{,_suspend,_autosuspend}() * Attempt to deemphasize some of the implementation details (e.g., "asynchronous" instead of "queue") * Try for more clear user-facing language. For example, "set up autosuspend" isn't quite clear whether we're configuring autosuspend, or if we're initiating an attempt to autosuspend (i.e., setting a timer). pm_runtime_barrier(): currently, we speak a lot about implementation details and sequences of events, but obscure the key point that it treats "pending resume" and "pending suspend" very differently -- I try to improve that. Signed-off-by: Brian Norris <briannorris@chromium.org> Link: https://patch.msgid.link/20260904141215.3.I3bdec7dcda46e1bee6d4f91530518fbe9c9096fd@changeid Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-09-17PM: runtime: Improve set_{status,active,suspended} docsBrian Norris
The set_active()/set_suspended() docs don't mention that they also clear the 'runtime_error' field. This is a very important note, since that's one key purpose for using them. Fix a typo in __pm_runtime_set_status() while we're at it. Signed-off-by: Brian Norris <briannorris@chromium.org> Link: https://patch.msgid.link/20260904141215.2.If02a538531ea004987c9a28a8d030ee9f71221cd@changeid Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-09-17PM: runtime: kerneldoc fixesBrian Norris
When included into a Documentation/.../*.rst file, `make htmldocs` complains: ./include/linux/pm_runtime.h:359: WARNING: Bullet list ends without a blank line; unexpected unindent. [docutils] [... more ...] We should fix up the list format here to look nicer in HTML form, and avoid warnings. Adjust to a few other kerneldoc-isms (formatting, "Return:") while we're at it too. The result now passes 'make htmldocs' without warning, once these files are included in Documentation/.../*.rst. Signed-off-by: Brian Norris <briannorris@chromium.org> Link: https://patch.msgid.link/20260904141215.1.Ib31d6be7e93f6c02321d03c78ea410e02d7380fc@changeid Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-09-16driver core: Constify the signature of device_show/store_*()Thomas Weißschuh
Prepare for the constification of 'struct dev_ext_attribute' by changing the signature of the standard callback functions. Migrate the hv-24x7 driver in the same commit. It is the only user to manually assign one of the standard callbacks. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://patch.msgid.link/20260907-sysfs-const-attr-dev_ext_attr-v2-3-bf53afe57071@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-09-11PM: runtime: Add kunit test for supplier idle/suspendBrian Norris
Add a unit test that covers the bugfix/optimization in the previous patch, "PM: runtime: Only queue an idle check for RPM-linked suppliers". This test ensures: 1) device links with DL_FLAG_PM_RUNTIME can RPM-resume/suspend properly; and 2) device links without DL_FLAG_PM_RUNTIME are not accidentally resumed/suspended along with the consumer. Notably, without patch 1 ("PM: runtime: Only queue an idle check for RPM-linked suppliers"), the no-RPM supplier will fail 2 of its last 3 test expectations: $ tools/testing/kunit/kunit.py run --kconfig_add CONFIG_PM=y 'pm_runtime*' ... ## Fails because rpm_suspend_suppliers() suspended the wrong links [17:01:44] # pm_runtime_supplier_suspend_test: EXPECTATION FAILED at drivers/base/power/runtime-test.c:279 [17:01:44] Expected pm_runtime_active(norpm_supplier) to be true, but is false ## Fails because the no-RPM supplier is already suspended unexpectedly [17:01:44] # pm_runtime_supplier_suspend_test: EXPECTATION FAILED at drivers/base/power/runtime-test.c:282 [17:01:44] Expected 0 == pm_runtime_suspend(norpm_supplier), but [17:01:44] pm_runtime_suspend(norpm_supplier) == 1 (0x1) ... Signed-off-by: Brian Norris <briannorris@chromium.org> Link: https://patch.msgid.link/20260901013341.1417232-2-briannorris@chromium.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-09-11PM: runtime: Only queue an idle check for RPM-linked suppliersBrian Norris
When a device RPM-suspends, it queues up an idle check for all of its suppliers, in case that device was the last consumer, and those suppliers are now able to suspend. Today, we do this for all suppliers, and not only for those suppliers that are marked for use by runtime PM. This isn't directly harmful, but it is a bit wasteful, and also may induce unexpected suspend attempts (e.g., if a device was purposely last touched with pm_runtime_put_noidle()). To avoid excess idle checks, only call pm_request_idle() on linked suppliers that opted into runtime PM. Noticed by inspection of trace logs. This is not expected to have a functional impact on systems that are using device links properly, and should only be considered an optimization. Fixes: 5244f5e2d801 ("PM: runtime: Defer suspending suppliers") Signed-off-by: Brian Norris <briannorris@chromium.org> Link: https://patch.msgid.link/20260901013341.1417232-1-briannorris@chromium.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-09-08cacheinfo: Export get_cpu_cacheinfo_id() for loadable modulesQiuxu Zhuo
get_cpu_cacheinfo_id() is a static inline that requires get_cpu_cacheinfo(), which is not exported. Modules that need to identify which cache instance a CPU belongs to therefore cannot use it. Move it out of line and export it. Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com> Link: https://patch.msgid.link/20260828153002.10290-2-tony.luck@intel.com
2026-09-08driver core: fix typos in commentsHemanth Selam
Fix typos in comments, reported by scripts/checkpatch.pl using the misspelling list in scripts/spelling.txt. Only touches comments, no code changes. Assisted-by: LLM Signed-off-by: Hemanth Selam <hemanth.selam@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Link: https://patch.msgid.link/20260904111816.31254-1-hemanth.selam@gmail.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>