summaryrefslogtreecommitdiff
path: root/drivers/acpi
AgeCommit message (Collapse)Author
31 hoursMerge branches 'acpi-cppc-fixes' and 'pm-cpufreq-fixes'Rafael J. Wysocki
Merge ACPI CPPC library fixes and cpufreq fixes for 7.4-rc1: - Drop compliance checks involving nominal performance from the ACPI CPPC library to unbreak the CPPC sysfs interface and the intel_pstate driver on some Intel platforms after a recent change that added those checks (Rafael Wysocki) - Make the ACPI CPPC library reject EPP registers that are too small to store all of the possible EPP values (Christian Loehle) - Make cpufreq_driver_target() skip inactive policies to avoid a NULL pointer dereference on a frequency table access attempt (Zhongqiu Han) - Set the CPPC Enable register in cpu_init() in the CPPC cpufreq driver to enable CPPC on platforms that wait for the OS to enable it (Sumit Gupta) * acpi-cppc-fixes: ACPI: CPPC: Drop compliance checks involving nominal performance ACPI: CPPC: Reject EPP registers narrower than 8 bits * pm-cpufreq-fixes: cpufreq: Skip inactive policies in cpufreq_driver_target() cpufreq: CPPC: Set CPPC Enable register in cpu_init()
2 daysACPI: PM: Avoid initializing power management for absent devicesRafael J. Wysocki
Commit 2f4ddf2bd1ba ("ACPI: scan: Stop calling acpi_bus_init_power() early") removed a device presence check from acpi_bus_init_power() which in some cases causes power management to be initialized for an ACPI device object and never used going forward. That in turn may prevent power management from working as expected for other devices. Namely, if a given ACPI device object is not enabled according to its _STA, find_child_checks() will return an error for it which will prevent it from being used as an ACPI companion for a PCI device. Thus if acpi_device_init_power() initializes power management for it and its initial power state turns out to be different from D3cold, it may stay in that power state forever. If it has power resources and they are "on" during the initialization, they may be reference-counted and never turned off. If they are shared with other devices, they will prevent power from going down after attempting to put the other devices into low-power states. To prevent that from happening, restore the device presence check in acpi_bus_init_power(), but also adjust find_child_checks() to return an error for absent devices (instead of doing that for disabled devices) in accordance with acpi_bus_init_power() and the existing check in acpi_bus_attach(). Fixes: 2f4ddf2bd1ba ("ACPI: scan: Stop calling acpi_bus_init_power() early") Reported-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com> Tested-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Link: https://patch.msgid.link/13013440.O9o76ZdvQC@rafael.j.wysocki Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
5 daysACPI: CPPC: Drop compliance checks involving nominal performanceRafael J. Wysocki
On a number of Intel platforms in the field, the nominal performance value in ACPI _CPC (which is an integer embedded in the _CPC package) is less than the guaranteed performance value, and it may even be less than the minimum nonlinear performance value or greater than the highest performance value (that all come from register reads). The new specification compliance checks involving those values added by commit 32299b29a887 ("ACPI: CPPC: Validate _CPC entry and control semantics") cause the CPPC library to refuse to work for some CPUs on the affected systems which in turn causes the intel_pstate driver to overestimate the maximum performance levels for those CPUs. One of the affected systems is Dell Pro 5 14 P514260. In this particular case, the fact that the specification is not exactly followed has no implications and the checks enforcing compliance are not really useful, so drop the checks in question from the CPPC library. If really necessary, they will need to be done elsewhere. Fixes: 32299b29a887 ("ACPI: CPPC: Validate _CPC entry and control semantics") Reviewed-by: Christian Loehle <christian.loehle@arm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/6060382.DvuYhMxLoT@rafael.j.wysocki
7 daysACPI: CPPC: Reject EPP registers narrower than 8 bitsChristian Loehle
The EPP interfaces use an 8-bit preference, but ACPI permits narrower fields. With a 4- or 6-bit SystemMemory field, writing 128 succeeds but stores zero, requesting maximum performance instead. Reject a present EPP register narrower than eight bits during _CPC probe. Use the existing error path to release previously acquired resources and leave the CPU's CPPC descriptor unpublished. Keep absent EPP entries and registers at least eight bits wide on their existing paths. Fail the whole probe instead of disabling only EPP. This also makes amd-pstate's acpi_cpc_valid() check reject the platform before registering its MSR or shared-memory driver. No affected hardware is known or expected and the specification is expected to no longer permit these in the future [1]. Fixes: 922607a2b462 ("cpufreq: CPPC: Add support for autonomous selection") Link: https://github.com/tianocore/edk2/issues/10838 [1] Signed-off-by: Christian Loehle <christian.loehle@arm.com> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Cc: All applicable <stable@vger.kernel.org> [ rjw: Changelog tweak ] Link: https://patch.msgid.link/20261113130411.1433174-1-christian.loehle@arm.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
8 daysMerge tag 'acpi-7.4-rc3' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix a mistake in the ACPI APEI GHES code causing recoverable CPU, memory, CXL and vendor-specific errors reported through GHES to never show up in a vmcore, address a potential deadlock related to ACPI device hotplug that causes lockdep to complain and give up, and fix up the recently added support for _Ixx GPEs: - Make recoverable CPU, memory, CXL and vendor-specific errors reported through GHES show up in vmcores by fixing a broken error severity check in ghes_log_hwerr() (Breno Leitao) - Avoid printing diagnostic messages for ACPI device objects after dropping reference to them (Sasha Levin) - Avoid holding the physical_node_lock for ACPI device objects across device_offline() and device_online() due to a potential deadlock that causes lockdep to complain and turn itself off (Sasha Levin) - Avoid spurious system wakeups from suspend-to-idle on platforms where an _Ixx GPE is shared by user-wakeup and background events (Saranya Gopal)" * tag 'acpi-7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: s2idle: Handle shared _Ixx GPEs without an EC ACPI: APEI: GHES: Fix severity check in ghes_log_hwerr() ACPI: scan: Do not hold physical_node_lock across device_offline() and device_online() ACPI: scan: Print the offline failure message in acpi_bus_offline()
9 daysMerge branches 'acpi-scan' and 'acpi-apei'Rafael J. Wysocki
Merge core ACPI support code fixes and an ACPI APEI fix for 7.4-rc3: - Avoid printing diagnostic messages for ACPI device objects after dropping reference to them (Sasha Levin) - Avoid holding the physical_node_lock for ACPI device objects across device_offline() and device_online() due to a potential deadlock that causes lockdep to complain and turn itself off (Sasha Levin) - Make recoverable CPU, memory, CXL and vendor-specific errors reported through GHES show up in vmcores by fixing a broken error severity check in ghes_log_hwerr() (Breno Leitao) * acpi-scan: ACPI: scan: Do not hold physical_node_lock across device_offline() and device_online() ACPI: scan: Print the offline failure message in acpi_bus_offline() * acpi-apei: ACPI: APEI: GHES: Fix severity check in ghes_log_hwerr()
11 daysACPI: LoongArch: Validate ACPI IOVT device entriesHuacai Chen
START and END device entries in ACPI IOVT should be paired and adjacent, while SINGLE entries shouldn't be between START and END. So add a iovt_validate_entries() function to validate the entries before the real parsing. By the way, move kzalloc_obj() from the ACPI_IOVT_DEVICE_ENTRY_END case to the ACPI_IOVT_DEVICE_ENTRY_START case, so as to avoid NULL pointer dereference. Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
11 daysACPI: LoongArch: Add checksum validation for ACPI IOVT tableBibo Mao
Checksum information is put in acpi_table_header, here add checksum validation support with IOVT table. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
11 daysACPI: LoongArch: Fix incorrect pointer in acpi_iovt_init()Bibo Mao
In acpi_iovt_init(), hdr is of type struct acpi_table_iovt *. Passing &hdr results in a pointer to the local variable rather than a pointer to the IOVT table. Drop the address-of operator and pass hdr directly. Cc: stable@vger.kernel.org Fixes: a9b0c34507eb ("ACPI: LoongArch: Add acpi_arch_[late]_init()") Signed-off-by: Bibo Mao <maobibo@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
11 daysACPI: s2idle: Handle shared _Ixx GPEs without an ECSaranya Gopal
When first_ec is NULL, acpi_ec_dispatch_gpe() previously treated any active GPE as a wake source. On platforms where an _Ixx GPE is shared by user-wakeup and background events, that can cause unnecessary wakeups. Make acpi_ec_dispatch_gpe() return an int and return -ENODEV when no EC instance is available so that acpi_s2idle_wake() can handle that case: on x86, treat the first GPE armed for wake via an _Ixx method like the EC GPE, mirroring acpi_ec_dispatch_gpe(). That is, report a wakeup if the status bit is set for any enabled GPE other than the _Ixx one. Otherwise, cancel the SCI-related wakeup and dispatch the _Ixx GPE if its status bit is set, so the events behind it can be processed. Drivers handling genuine wake events are expected to report them via pm_wakeup_event(), which the common s2idle path will catch after synchronizing event processing. If no _Ixx GPEs have been armed, and in the non-x86 fallback, the previous any-GPE status check is retained. If GPEs are armed via more than one _Ixx method, the first one is used as the wake indicator and the remaining ones are treated as regular wake sources. Fixes: 46767b17fda3 ("ACPI: PM: s2idle: Add _Ixx GPE wake indicator support") Signed-off-by: Saranya Gopal <saranya.gopal@intel.com> Link: https://patch.msgid.link/20261106125814.1112331-1-saranya.gopal@intel.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-11-05treewide: Convert devm_kmalloc() family to the devm_kmalloc_obj() familyKees Cook
Mirroring the earlier kmalloc_obj() conversion, convert the device-managed allocators over to the type-based API using the now updated scripts/coccinelle/api/kmalloc_objs.cocci. The size is derived from the type rather than written out as a sizeof(), and the result is a pointer to that type rather than void *, so a mismatch between the size requested and the variable assigned becomes a build error instead of being silently accepted. The conversions break down as: 6713 devm_kzalloc_obj() 1749 devm_kzalloc_objs() 307 devm_kzalloc_flex() 91 devm_kmalloc_objs() 82 devm_kmalloc_obj() 2 devm_kmalloc_flex() The rules deliberately leave alone allocations sized by a string or a byte-sized type, or assigned to a pointer to a byte-sized type, since those are byte buffers rather than objects. Allocations sized by a multi-byte integer type are only converted when they are assigned to a pointer to that same type, and allocations of pointers to integers or of void pointers are left alone too. After this change, 528 files still call devm_kmalloc(), devm_kzalloc(), devm_kcalloc(), or devm_kmalloc_array(). Build tested with allmodconfig on x86_64, arm64, i386, arm, riscv, s390, m68k, mips, parisc, sparc, loongarch, arc, xtensa, and openrisc with GCC 16.2.0 with no new warnings. Signed-off-by: Kees Cook <kees+treewide@kernel.org>
2026-11-05treewide: refresh kmalloc_obj() conversionsKees Cook
Refresh the tree with run of the existing Coccinelle rules in scripts/coccinelle/api/kmalloc_objs.cocci, now that they also convert arrays of multi-byte integers. The conversions break down as: 435 kzalloc_objs() 169 kmalloc_objs() 52 kvzalloc_objs() 47 kzalloc_obj() 42 kvmalloc_objs() 8 kmalloc_obj() 2 kzalloc_flex() 2 kvmalloc_flex() and 37 existing kmalloc_obj() family calls drop a redundant GFP_KERNEL. Build tested with allmodconfig on x86_64 with GCC 16.2.0, and, together with the devm_kmalloc_obj() conversion that follows, on x86_64, arm64, i386, arm, riscv, s390, m68k, mips, parisc, sparc, loongarch, arc, xtensa, and openrisc with GCC 16.2.0 with no new warnings. Signed-off-by: Kees Cook <kees+treewide@kernel.org>
2026-11-04ACPI: APEI: GHES: Fix severity check in ghes_log_hwerr()Breno Leitao
ghes_log_hwerr() is meant to count recoverable GHES errors in hwerror_data[], but it skips them and counts informational records instead. As a result, recoverable CPU, memory, CXL and vendor-specific errors reported through GHES never show up in a vmcore. ghes_do_proc() passes ghes_log_hwerr() the record severity after ghes_severity() has converted it to a GHES_SEV_* value. ghes_log_hwerr() compares it against CPER_SEV_RECOVERABLE, which is 0 in the CPER enum and matches GHES_SEV_NO, so only informational records pass and GHES_SEV_RECOVERABLE ones return early. Compare against GHES_SEV_RECOVERABLE instead. Recoverable PCIe errors that ghes_handle_aer() hands to AER are also counted by pci_dev_aer_stats_incr(), so with the check fixed they are counted twice under HWERR_RECOV_PCI. That is not addressed here. Fixes: 3fa805c37dd4 ("vmcoreinfo: track and log recoverable hardware errors") Cc: stable@vger.kernel.org Signed-off-by: Breno Leitao <leitao@debian.org> Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com> Link: https://patch.msgid.link/20261030-ghes-hwerr-sev-v1-1-145ceb996c77@debian.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-11-04ACPI: scan: Do not hold physical_node_lock across device_offline() and ↵Sasha Levin
device_online() acpi_bus_offline() and acpi_bus_online() hold the physical_node_lock of the ACPI device being hot-removed while they call device_offline() and device_online() for its physical nodes. Offlining a CPU this way takes cpu_add_remove_lock and the CPU hotplug lock under physical_node_lock, and lockdep connects that to the uevent attribute of platform devices, whose store method takes physical_node_lock in acpi_primary_dev_companion(): physical_node_lock (acpi_bus_offline()) -> cpu_add_remove_lock -> cpu_hotplug_lock -> cpuhp_state-down (mce_cpu_pre_down() unregistering a device) -> device_links_lock (device_links_purge()) -> kn->active of a uevent attribute (device link unregistration) -> physical_node_lock (uevent_store() -> acpi_companion_match()) syzbot has reported this cycle twice. The uevent attribute waited for in the link unregistration is the device link's, not a platform device's, and the physical_node_lock taken at the end is that of the platform device's ACPI companion, not of the processor being ejected, so lockdep only connects them because they share lock classes and this is unlikely to deadlock. However, lockdep turns itself off after reporting it. It can be reproduced in a QEMU guest by writing to the uevent attribute of an ACPI-enumerated platform device, reading the uevent attribute of a device link while the link is removed, offlining a CPU and ejecting one through sysfs. physical_node_lock protects the list of physical nodes. Since acpi_unbind_one() blocks on it, holding it also keeps device_offline() and device_online() from running in parallel with whatever happens to a device after it has been unbound from its ACPI companion, but that is not necessary: a reference to each device is held while the lock is dropped, and the removal of the devices that can actually be taken offline here (CPUs, memory blocks and containers) is serialized by the device hotplug lock or acpi_scan_lock, both of which acpi_device_hotplug() holds throughout. So drop physical_node_lock around device_offline() and device_online(). Mark the nodes to offline with a new offline_pending flag, hold a reference to each device while the lock is dropped, and look its node up again afterwards to record whether it needs to be put back online, because it may have been unbound in the meantime. Physical nodes added while the lock is not held are not offlined by the current pass, which is no different from adding them right after it. Since acpi_container_offline() no longer runs under the container's physical_node_lock, the nesting annotation added to acpi_scan_is_offline() by commit 4c533c801d1c ("ACPI / scan: Annotate physical_node_lock in acpi_scan_is_offline()") is not needed anymore, so drop it. Fixes: 683058e315f0 ("ACPI / hotplug: Use device offline/online for graceful hot-removal") Reported-by: syzbot+cea7285bc17b76ffe39f@syzkaller.appspotmail.com Closes: https://lore.kernel.org/r/6ae18ed0.6200f071.51519.0f60.GAE@google.com Reported-by: syzbot+a265816368571f78ab88@syzkaller.appspotmail.com Closes: https://lore.kernel.org/r/6adf293a.67317f00.38c4bc.00af.GAE@google.com Signed-off-by: Sasha Levin <sashal@kernel.org> Link: https://patch.msgid.link/20261029034507.2721580-3-sashal@kernel.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-11-04ACPI: scan: Print the offline failure message in acpi_bus_offline()Sasha Levin
When a physical node of an ACPI device being hot-removed cannot be offlined, acpi_bus_offline() passes the physical device back to acpi_scan_try_to_offline() through ret_p and the latter prints "Offline failed." for it after the namespace walk. By then physical_node_lock is not held anymore, so the device may have been unbound from its ACPI companion and freed in the meantime. Print the message in acpi_bus_offline() when device_offline() fails in the second pass, while physical_node_lock keeps the device bound to its ACPI companion and so the reference taken by acpi_bind_one() is still held. acpi_scan_try_to_offline() only needs to know that something could not be offlined, so pass the ACPI device back through ret_p instead, like in the "Offline disabled." case. Fixes: 303bfdb1a14d ("ACPI / scan: Add second pass of companion offlining to hot-remove code") Suggested-by: Rafael J. Wysocki <rafael@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> Link: https://patch.msgid.link/20261029034507.2721580-2-sashal@kernel.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-10-30Merge tag 'acpi-7.4-rc1-2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI support fixes from Rafael Wysocki: "These address assorted issues in ACPI support code and work around concurrency-related issues in AML on some platforms: - Separate handler locking from sysfs lifetime in the ACPI platform profile driver to avoid possible deadlocks due to sysfs accesses during driver removal (Daniel Lezcano) - Introduce additional locking around the evaluation of selected ACPI control methods in a few places to work around issues related to concurrency in AML on some platforms (Ali Ahmet Memiş) - Address two issues reported by Sashiko in the ACPI table data sysfs interface (Jamie Nguyen) - Initialize parser_state.aml_end in acpi_install_method() properly to avoid out-of-bounds accesses during control method installation (Ivan Hu)" * tag 'acpi-7.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: sysfs: Finish sysfs init when creating a table file fails ACPI: sysfs: Map only the requested range in acpi_data_show() ACPICA: Initialize parser_state.aml_end in acpi_install_method() ACPI: platform_profile: Separate handler locking from sysfs lifetime platform/x86: ideapad-laptop: Evaluate ACPI methods exclusively thermal: intel: int340x: Evaluate _TMP exclusively ACPI: battery: Evaluate battery methods exclusively ACPI: utils: Add exclusive AML evaluation helpers
2026-10-30Merge tag 'loongarch-7.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch updates from Huacai Chen: - Add LoongArch-specific ACPI initialization - Set NX compat flag in PE/COFF efi header - Use pa_to_nid()/nid_to_addrbase() rather than hard-code - Detect and expose LAMCAS/DIV32 feature existence - Fix and improve perf hardware breakpoints - Fix and improve BPF JIT (trampoline and 32-bit operations) - Add arch_crash_save_vmcoreinfo() support - Some bug fixes and other small changes * tag 'loongarch-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: (24 commits) soc: loongson: loongson2_guts: Use of_root instead of own reference soc: loongson: loongson2_pm: Fix build warnings for 32BIT LoongArch: dts: loongson-2k0500: Drop unsupported bus_id in DWMAC LoongArch: BPF: Optimize 32-bit operations using native instructions LoongArch: BPF: Clean up and decouple is32 parameter from move_imm() LoongArch: BPF: Fix stack arguments for indirect trampolines LoongArch: Add arch_crash_save_vmcoreinfo() support LoongArch: Fix one-shot limitation for perf hardware breakpoints LoongArch: Fix perf hardware breakpoint failure via installation LoongArch: Only send SIGTRAP signal if necessary in do_watch() LoongArch: Fix architectural naming typo for CSR_FWPS_SKIP LoongArch: Fix bitmask corruption in update_bp_registers() LoongArch: Remove redundant call in update_bp_registers() LoongArch: Remove arch-specific __smp_mb__{before,after}_atomic() LoongArch: Detect and expose DIV32 feature existence LoongArch: Detect and expose LAMCAS feature existence LoongArch: Use pa_to_nid()/nid_to_addrbase() rather than hard-code LoongArch: Don't init & online empty nodes LoongArch: Call cpu_final_simd() with pure_initcall() LoongArch: Use assign_bit() API where applicable ...
2026-10-30Merge branches 'acpi-driver' and 'acpi-sysfs'Rafael J. Wysocki
Merge additional updates related to ACPI support in device drivers and ACPI sysfs interface fixes for 7.4-rc1: - Separate handler locking from sysfs lifetime in the ACPI platform profile driver (Daniel Lezcano) - Introduce additional locking around the evaluation of selected ACPI control methods in a few places to work around issues related to concurrency in AML on some platforms (Ali Ahmet Memiş) - Address two issues reported by Sashiko in the ACPI table data sysfs interface (Jamie Nguyen) * acpi-driver: ACPI: platform_profile: Separate handler locking from sysfs lifetime platform/x86: ideapad-laptop: Evaluate ACPI methods exclusively thermal: intel: int340x: Evaluate _TMP exclusively ACPI: battery: Evaluate battery methods exclusively ACPI: utils: Add exclusive AML evaluation helpers * acpi-sysfs: ACPI: sysfs: Finish sysfs init when creating a table file fails ACPI: sysfs: Map only the requested range in acpi_data_show()
2026-10-29Merge tag 'riscv-for-linus-7.4-mw1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V updates from Paul Walmsley: - Add support for crash hotplug - Improve user copy performance on cores with fast misaligned accesses - Optimize code paths involving pgtable_l{4,5}_enabled() by patching in the return values during early boot (since these don't change during runtime), or by specifying the return values directly in Kconfig files (for purpose-built kernels) - Change the PCIe bus reassignment behavior to depend on the PCI_REASSIGN_ALL_BUS PCI flag (as ARM64 does) - Avoid an unnecessary sstatus CSR read during context switch - Make the sbi_ecall() macro variadic, improving code clarity - Refactor __switch_to_vector() to prepare for upcoming vector context switch optimizations - Add a kselftest for vectorized user copy - Add bounds checking on the shadow stack restore token address to avoid it being used as an attack vector - Fix the shadow stack and indirect branch landing pad control functions to only update the CPU's envcfg CSR when operating on the current task - For MIPS RISC-V systems, add support for early boot-applied errata; and for P8700 RISC-V systems, avoid WFI usage in the kernel (since it is buggy) - Add the "B" RISC-V ISA extension to hwcap and hwprobe reporting - Add support for specifying and reporting the "Zic64b" RISC-V ISA extension, and add it to the SpacemiT K1, K3, and Sophgo SG2044 DT files - Require the block size of cache management operations to be specified in DT schema validation for the RISC-V ISA extensions Zicbom, Zicbop, and Zicboz - Some miscellaneous fixes: fix an incorrect bitfield width in the RVG_SYSTEM_CSR_MASK bitmask macro; make RISCV_ALTERNATIVE mandatory, now that XIP kernel support has been removed; and remove some unnecessary includes in kernel/smp.c * tag 'riscv-for-linus-7.4-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (28 commits) riscv: mm: unexport _pgtable_l4_enabled and _pgtable_l5_enabled riscv: introduce RISCV_ISA_SV48 and RISCV_ISA_SV57 riscv: support early isa ext and use it to optimize pgtable_l4|l5_enabled riscv: convert pgtable_l4|l5_enabled to inline function riscv: remove RISCV_ALTERNATIVE Kconfig option riscv: Add a getter for user PMLEN support riscv: dts: sophgo: sg2044: Add Zic64b ISA extension riscv: dts: spacemit: k1: Add Zic64b ISA extension riscv: dts: spacemit: k3: Add Zic64b ISA extension riscv: Add Zic64b to cpufeature and hwprobe dt-bindings: riscv: Add Zic64b extension description dt-bindings: riscv: Require block-size for Zicbom, Zicbop, and Zicboz riscv: Add B to hwcap and hwprobe riscv: remove unused profile.h includes riscv: cfi: Only write envcfg CSR when task is current riscv: cfi: Bounds check restore token before swap riscv: Add ERRATA_MIPS_P8700_WFI to replace WFI with mips.pause selftest: riscv: test vectorized user copy riscv: vector: refactor context switch for kernel-mode vector riscv: do not read csr in vector context switch ...
2026-10-28Merge tag 'platform-drivers-x86-v7.4-1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver updates from Ilpo Järvinen: "The usual updates for laptop quirks from HP, ASUS, Acer, Dell etc: - new model names and recent CPU support - more special button / function key handling - battery and hardware monitoring quirks Tool updates to intel-speed-select WMI now supports non-x86 architectures Miscellaneous cleanups / refactoring / improvements" * tag 'platform-drivers-x86-v7.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (237 commits) platform/x86: asus-wmi: name the TUF keyboard RGB state and speed codes platform/x86: asus-wmi: fix TUF keyboard power state shutdown naming platform/x86: asus-wmi: rename TUF RGB state DEVID to _CMD platform/x86: asus-armoury: add power limits quirk for GU605CM platform/x86: asus-armoury: add power limits quirk for G533QS platform/x86: asus-armoury: add power limits quirk for GA402NV platform/x86: asus-armoury: add power limits quirk for FA608UP platform/x86: asus-armoury: add power limits quirk for FA608UH platform/x86: asus-armoury: add power limits quirk for FA608PM platform/x86: asus-armoury: add power limits quirk for G713QR platform/x86: ibm_rtl: Fix potential OOB read at signature search platform/x86: acer-wmi: Add support for Acer Nitro AN16-41 platform/x86: acer-wmi: Cycle platform profile on mode key 0x4 platform/x86: hp-wmi: Disable hwmon attributes when no fans are usable platform/x86: gpd pocket fan: Cancel work before releasing GPIOs platform/x86: asus-armoury: Add XBOX ROG Ally X 20 Tunables platform/x86: msi-wmi: Ignore WMI events for keys also handled by atkbd platform/x86: msi-wmi: Sort scancodes numerically platform: arm64: Add a driver for the EC found on ASUS Glymur machines MAINTAINERS: Add myself as a LENOVO drivers co-maintainer ...
2026-10-27ACPI: LoongArch: Add support for acpi_iommu_configure_id()Bibo Mao
acpi_iommu_configure_id() currently only supports IORT and VIOT. Add support for LoongArch's IOVT as well. Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org> Signed-off-by: Bibo Mao <maobibo@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2026-10-27ACPI: LoongArch: Add acpi_arch_[late]_init()Bibo Mao
LoongArch IOMMU scanning flow is similar with virtio-iommu, there is an early init phase and a late init phase. In the early init function, PCI ACS is enabled if there is IOMMU table, and the late init function is called after PCI device scanning, where IOVT table scanning function is executed. Here add acpi_arch_init() and acpi_arch_late_init() API for LoongArch: the acpi_iovt_init() function is to enable PCI ACS function if the IOMMU device exists in IOVT table; while the acpi_iovt_late_init() function is to scan IOVT table and add IOMMU devices. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2026-10-24Merge tag 'sound-7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "The AI flood continues, which brought us a fairly busy development cycle again with changes spread across the subsystem, ranging from (lots of) core hardening to new platforms and codecs. Here are some highlights. ALSA core: - PCM: race fixes around channel-map controls, draining/unlink, drop sync-stop handling, and DMA buffer delay sync - Compress-offload: state and geometry validations, buffer leak fix, and stream/card lifetime management - Jack: module pinning during debugfs access, control removal race fix, and early injection exposure - Timer & sequencer: module pinning for user timers, RCU grace period wait on port deletion, UMP bounds fixes - Mark OSS sequencer emulation as deprecated - RawMIDI: proper disconnect handling and input work drain cleanup - Control: fixes for vmaster racy setups and control callback serialization, UAF fix on card disconnect ASoC core: - Continued framework refactoring, deployment of auto_selectable_formats across codecs and platform DAIs - Generic card cleanup: free jack GPIOs on card remove for simple-card and audio-graph-card variants - SDCA improvements: SimpleJack function type support, library helpers, and non-ACPI build support - Conversion of deprecated DMA API calls ASoC SOF: - Support for compressed audio playback on SOF IPC4 with Intel TGL+ - AMD ACP 7.B / 7.F SoundWire and PDM controller support, ASP carveout firmware loading - Function topology support for Intel I2S machines ASoC platforms & codecs: - Qualcomm: New QAIF driver for Shikra platform, WCD9378 SDCA codec, Nord Ride/RRD and Motorola Edge 30 boards, LPASS macro cache converted to maple tree - New codec drivers: ESS ES9039Q2M, Nuvoton NAU83G60 amplifier, Senary SN624x SoundWire SDCA codec - MediaTek / Airoha: New Airoha AN7581 AFE and WM8960 machine drivers, extensive clock and error-handling cleanups across MediaTek SoCs - NVIDIA Tegra: WM8994 machine driver and CS35L45 MDSYNC support - Realtek: RT766/RT767, RT721_U, RT718 variants, RT712 GPIO LED control - Cirrus Logic: CS35L45 MDSYNC support, CS35L56 regmap default tests - TI: TAS2573 DSP support in TAS2781, TAS2783 SoundWire fixes - Everest Semi: ES8326 standby / HPF controls, ES8389 / ES8375 resume fixes - Removal of obsolete ST-Ericsson Ux500 MOP500 machine driver HD-audio: - ACPI controller runtime PM suspend/resume support - Controller shutdown and unbind race fixes for unsol events and jack polling - HDMI: High Bit Rate (HBR) audio capability enabled, ELD proc and converter bounds checks - AW88399 side codec SSID-specific firmware naming and Lenovo Legion R9000P enablement - Realtek / Conexant / Cirrus / TI quirks for numerous laptops (Lenovo, ASUS, HP, Acer, HONOR, Minisforum, MSI, etc.) - Creative CA0132 Sound BlasterX AE-5 external RGB LED strip support USB-audio: - Dedicated mixer driver for Audient EVO4 - Native Instruments Kore controller LCD support and keymap fix - Pioneer DJ DDJ-SZ and Roland (OCTA-CAPTURE / QUAD-CAPTURE multirate, TD-11) support - UAC2/3 mixer unit matrix evaluation and bounds checking - Hardening for LINE6 and caiaq drivers against malformed packets and races - Device-specific quirks for PreSonus, TASCAM, Logitech, Mayflower, MOONDROP, Yamaha, etc. Misc: - Auto-cleanup conversion for snd_card_free() and devres migration across dozens of legacy PCI, ISA, and Sparc drivers - ALSA loopback (aloop) timer lifecycle fixes and new aloop selftest - pcmtest driver fixes and kselftest updates" * tag 'sound-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (924 commits) ALSA: hda/realtek: Add mute and mic-mute LEDs for HP ENVY 16 (103c:8be5) selftests: ALSA: pcmtest: Compare all captured bytes in ni_capture ALSA: usb-audio: Use strscpy() in append_ctl_name() ALSA: caiaq: Use strscpy() in snd_usb_caiaq_input_init() ALSA: hiface: Use scnprintf() in hiface_chip_create() selftests/alsa: Check the aloop PCM Slave controls for a matching playback ALSA: aloop: Update the PCM Slave controls for a matching playback selftests: ALSA: pcmtest: Make room for the longest fill pattern selftests: ALSA: pcmtest: Check the frame count of each transfer ALSA: hda/realtek: Fix speakers on COLORFUL L1 Plus ALSA: hda/realtek: enable AW88399 on Lenovo Legion R9000P AFR10 ALSA: line6: Handle period elapsed calls outside the locks ALSA: emux: Stop voices before freeing zones in all cases ALSA: emux: Fix UAF of soundfont zones at note-on ALSA: mtpav: restore negation dropped in guard() conversion ALSA: compress: reject restarting an ACTIVE task via origin_seqno ALSA: compress: add missing OPEN-state gate to SET_METADATA ALSA: compress: reject buffer geometry change on gapless next_track ALSA: compress: fix buffer leak on failed SET_PARAMS ALSA: hda/realtek: Enable jack detection on Minisforum AI X1 ...
2026-10-24Merge tag 'tty-7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty / serial driver updates from Greg KH: "Here is the "big" set of tty and serial driver updates for 7.4-rc1. It's not really all that big, it's been kind of quiet in this area of the tree this development cycle in relation to other parts of the tree. But still, included in here are: - 8250 port updates and fixes - 8250 driver cleanups by Jiri - deletion of the obsolete moxa driver (making this pull request remove more lines than added!) - different serial driver updates for dma and other reported issues All of these have been in linux-next with no reported problems" * tag 'tty-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (91 commits) tty: hvc: dcc: Detect JTAG connection only on CPU core 0 serial: earlycon: Use isdigit() in earlycon_init() serial: core: Use isdigit() in uart_parse_options() dt-bindings: serial: snps-dw-apb-uart: Add Synaptics sl2610 uart serial: amba-pl011: drive the bus during break in RS485 mode serial: mcf: update author email address serial: pmac_zilog: report received breaks serial: pmac_zilog: push received data to the port that received it serial: amba-pl011: keep transmitter enabled when disabling RS485 serial: ma35d1: Do not force-enable an unselected console serial: amba-pl011: honour delay_rts_before_send for every write Revert "serial: 8250_port: Drop duplicate NULL check" serial: 8250: make port operations work on struct uart_8250_port serial: 8250_omap: set priv->line before enabling the IRQ serial: 8250_lpss: do not touch uninitialized line in ehl_serial_exit() serial: 8250_exar: store the GPIO platform device in struct exar8250 serial: 8250_exar: remove useless void * casts serial: 8250: drop err label from serial8250_register_8250_port() serial: core: fix TIOCSSERIAL and TIOCSERCONFIG on uninitialised ports serial: max310x: don't transmit while an RS485 reconfigure is pending ...
2026-10-23Merge tag 'pci-v7.4-changes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull PCI updates from Bjorn Helgaas: "Enumeration: - Set supported_speeds in set_pcie_port_type() so sparc64 and powerpc, which call it via of_create_pci_dev() instead of the usual pci_setup_device(), correctly set the supported PCIe link speeds (Stian Halseth) - When pcie_set_mps() changes MPS, update the value in the saved state so a subsequent restore doesn't restore an invalid value (Niklas Cassel) - Skip Target Speed quirk on clamped ports with no link (Maciej W. Rozycki) Driver binding: - Assume control of portdrv-related features only when portdrv is enabled, since we can't use them without portdrv (Kuppuswamy Sathyanarayanan) - Centralize feature ownership checking so code only needs to check 'host->native_X' and doesn't need to also check 'pcie_ports_native' (Kuppuswamy Sathyanarayanan) Error handling: - Fix leaks when ACPI APEI/GHES error events overflow the kfifo or mention a device that no longer exists (Priyank Rathod) - Fix aer_process_err_devices() leak when a device is recorded as an error source purely by being mentioned in the Root Port Error Source and the device is inaccessible or logged only masked errors (Priyank Rathod) ASPM: - Disable ASPM when drivers request that, even if the OS doesn't own ASPM; otherwise drivers do it on their own, which is worse (Ilpo Järvinen) Power management: - Align hibernate poweroff flow with suspend flow for bridges so they can be powered down at hibernate as they are for suspend (Mario Limonciello) - Restore BARs after powering up during enumeration to fix a regression on devices that don't preserve state in D3hot (Keng-Yu Lin) - Avoid D3 on PLX PEX 8532/8533/8548 downstream ports, where putting them in D3hot takes down the whole switch (Imre Kaloz) Power control: - Add GPIO driver for Toshiba TC9563 embedded GPIO controller (Alex Elder) - Add DT documentation and pwrctrl driver support for TC9563 embedded GPIO controller (Lorenzo Bianconi) - Switch the tc9563 per-port reset to use the GPIO descriptor API instead of direct regmap accesses (Lorenzo Bianconi) - Only destroy devices created by pwrctrl core, so that when removing a PCIe controller driver that uses pwrctrl, we don't remove devices populated by another mechanism (Shawn Lin) - Power off child devices on power-on failure (Lorenzo Bianconi) PCIe native device hotplug: - Make the 'pciehp_poll_mode' parameter read-only to prevent changes via sysfs, which can cause errors when unbinding (Runyu Xiao) Virtualization: - Read SR-IOV VF Revision ID and Subsystem ID from VF instead of assuming they're the same as VF 0; they may differ (Logan Odell) - Add ACS quirk for Pericom PI7C9X2G304 switches (Hans de Goede) Peer-to-peer DMA: - Add Zhaoxin KX-6000, KH-40000, KX-6000G, KX-7000, and KH-50000 host bridges to allowlist (LeoLiu-oc) - Add Alibaba T-HEAD Yitian 710 host bridge to allowlist (Feng Tang) - Add Intel Haswell client host bridge to allowlist (Scott Lee) - Intel Xeon E3/E5/E7 0x6f00 host bridge to allowlist (kai zhang) - Fix handling of errors in pci_p2pdma_add_resource() to avoid (a) unmapping a BAR if registering another fails and (b) use after free of p2p_pgmap (Leon Romanovsky) - Wait for RCU readers before freeing state to avoid use-after-free of pdev->p2pdma (Leon Romanovsky) - Restrict pci_p2pmem_find_many() to providers backed by a pool (Leon Romanovsky) - Safely terminate ACS redirect lists to avoid out-of-bounds access to the buffer (Leon Romanovsky) - Silence 'Host bridge not in P2PDMA whitelist' warnings unless caller, e.g., pci_p2pmem_find_many(), requests 'verbose' (Leon Romanovsky) Sysfs: - Return -ENODEV or -EIO sysfs 'label' or 'acpi_index' attributes when Device Name _DSM fails, not -1, which is interpreted as -EPERM (Krzysztof Wilczyński) - Return valid sysfs 'acpi_index' attribute even if the Device Name _DSM returned an invalid 'label' (Krzysztof Wilczyński) - Expose sysfs 'acpi_index' and 'label' based on whether the Device Name _DSM returns valid data, not merely whether the _DSM is implemented (Krzysztof Wilczyński) - Avoid out-of-bounds reads of the label returned by the Device Name _DSM, which is in UTF-16 characters, not bytes (Krzysztof Wilczyński) - Reject unaligned resource I/O port accesses, which can oops on arm64 (Deepanshu Kartikey) Endpoint framework: - Pass the correct physical and virtual endpoint function numbers when setting translation of inbound memory windows (Koichiro Den) - Make embedded doorbell IRQ non-shared, since currently only the first EPF can allocate doorbells (Koichiro Den) - MSI doorbells currently target the first EPF attached to an EPC; let other EPFs try the embedded doorbell instead of failing when they can't use the MSI doorbell (Koichiro Den) - Serialize scan of vNTB virtual PCI bus with other PCI topology changes (Koichiro Den) - Manage vNTB lifetimes to avoid leaking virtual devices and buses and allow removal (Koichiro Den) - Track vNTB link state from both sides so both see the same effective link state (Koichiro Den) - Configure vNTB MSI-X when supported to avoid IOMMU faults and failure to deliver doorbell interrupts on RC (Koichiro Den) APM X-Gene PCIe controller driver: - Use devm for clocks so they're automatically disabled, unprepared, and released if errors happen during probe (Yuho Choi) ASPEED PCIe controller driver: - Fix clk and PHY leaks in aspeed_pcie_port_init() error paths (Liu Zhenlong) Broadcom iProc PCIe controller driver: - Expose devm_pci_alloc_host_bridge_release() so drivers can share a devm release function even if they don't need the device tree parsing done by devm_pci_alloc_host_bridge() (Bjorn Helgaas) - Request only the memory window from BCMA Enumeration ROM and warn if it doesn't match the one in DT, which fixes an iproc-bcma probe failure (Semih Baskan) Broadcom STB PCIe controller driver: - Replace bool properties for each SoC configuration with a u32 bitvector and a BFLAG() helper (Jim Quinlan) - Use a similar BQUIRK() helper to test various SoC quirks (Jim Quinlan) Cadence PCIe controller driver: - Remove device links to PHY, which are redundant because the PHY core itself adds them (Vladimir Oltean) - Return error (not success) from cdns_plat_pcie_probe() if pm_runtime_get_sync() or cdns_pcie_ep_setup() failed (Vladimir Oltean) - Correct the driver data pointer usage; previously .probe() stored 'struct cdns_plat_pcie *', but .shutdown() used the pointer as 'struct cdns_pcie *', resulting in accessing garbage (Linmao Li) ESWIN PCIe controller driver: - Publish the platform driver MODULE_DEVICE_TABLE so the driver can be autoloaded when built as a module (Pengpeng Hou) Freescale i.MX6 PCIe controller driver: - Fix resource and pwrctrl device leaks .probe() (Zhijian Han) - Improve i.MX95 Gen3 link stability by changing MPLLB_BANDWIDTH from default 120 to 140 (Richard Zhu) - Use dev_err_probe() in host init error path to silence -EPROBE_DEFER messages (Alexander Stein) - Avoid dereferencing NULL clock names when 'clocks' includes more phandles than 'clock-names' has names (Rudi Heitbaum) - Add suspend_poweroff flag so platforms like i.MX that power off RC controllers during suspend can enter L2 so endpoints can get PME_Turn_Off notifications before power loss (Richard Zhu) Freescale Layerscape PCIe controller driver: - Enable PROBE_PREFER_ASYNCHRONOUS to reduce probe time of the four controllers on LX2160A (Vincent Jardin) Intel VMD host bridge driver: - Flush DMA writes before handling MSI on Meteor Lake: MSI may arrive before write has completed, resulting in an nvme 30 second stall before a QID timeout and possibly other similar problems (Rickey Bartlett) - Flush DMA writes before handling MSI on Arrow Lake (Vladimir Nedoshivin) Marvell Aardvark PCIe controller driver: - Disable PHY on probe failures (Myeonghun Pak) Marvell MVEBU PCIe controller driver: - Refcount child OF nodes during .probe() to make a concurrent OF overlay removal safe (Krzysztof Kozlowski) MediaTek PCIe controller driver: - Find INTx DT property by 'interrupt-controller' name instead of assuming it's the first child node (Zhengping Zhang) MediaTek PCIe Gen3 controller driver: - Fix a 64-bit type truncation in mtk_pcie_set_trans_table() to avoid issues with windows above or larger than 4GB (Sreeraj S Kurup) NVIDIA Tegra264 PCIe controller driver: - Fix the Link Capabilities offset so we read the correct register (Bjorn Helgaas) Qualcomm PCIe controller driver: - Only collect reset GPIOs from PCI bridge DT nodes to avoid stealing resets used by downstream devices like USB controllers (Christopher Obbard) - Block accesses to downstream devices on link down to reduce a storm of Completion Timeout AER interrupts (Qiang Yu) - Skip system suspend/resume for firmware-managed PCIe, where firmware manages clocks, regulators, resets, etc (Mrinmay Sarkar) - Honor IOMMU provider's #iommu-cells in qcom_pcie_config_sid_1_9_0() (Manivannan Sadhasivam) - Deinitialize endpoint on remove (Guangshuo Li) - Treat Root Port error recovery as successful even if link doesn't come up after reset because the device was hot-unplugged (Konrad Dybcio) - Skip unnecessary iMSI-RX initialization if DT 'msi-map' is present, indicating an external MSI controller (Ayiluri Naga Rashmi) Renesas R-Car PCIe controller driver: - Limit Max_Read_Request_Size to 256 to avoid hardware erratum (Marek Vasut) - Support PERST# via reset subsystem as well as the existing GPIO support to prepare for R-Car Gen5 SoCs (Marek Vasut) - Add DT and driver support for the R-Car Gen 5 X5H (R8A78000) PCIe Gen 4 core (Marek Vasut) - Add Application/Local register reset DT description and driver support for both host and endpoint mode (Marek Vasut) - Add PM ops so controller works after suspend/resume (Marek Vasut) Renesas RZ/G3S PCIe controller driver: - Disable refclk on probe failure (Lad Prabhakar) - Propagate platform_get_irq_byname() errors so probe deferral works correctly (Lad Prabhakar) - Tear down INTx handlers if subsequent initialization fails (Lad Prabhakar) - Add RZ/G3L (R9A08G046) DT and driver support (Biju Das) Rockchip PCIe controller driver: - Limit host and endpoint controllers to 2.5 GT/s since 5.0 GT/s is unsafe per Rockchip (Geraldo Nascimento) Synopsys DesignWare PCIe controller driver: - Set DMA_BYPASS bit in outbound IATU CTRL2 register to avoid data corruption if the iATU translates DMA engine transactions (Sumit Kumar) - Use FIELD_PREP() to remove need for *_SHIFT definitions (Hans Zhang) TI DRA7xx PCIe controller driver: - Remove device links to PHY, which are redundant because the PHY core itself adds them (Vladimir Oltean) - Fix optional clock leak when .probe() fails by using devm_clk_get_optional_enabled() (Felix Gu) TI Keystone PCIe controller driver: - Remove device links to PHY, which are redundant because the PHY core itself adds them (Vladimir Oltean) UltraRISC PCIe controller driver: - Allow DWC drivers to skip outbound iATU setup if they don't need translation between CPU and PCI addresses (Xincheng Zhang) - Skip MEM outbound iATU setup on DP1000 (Xincheng Zhang) Xilinx Versal CPM PCIe controller driver: - Add DT and driver support for optional PERST# for use in warm reset scenarios (Sai Krishna Musham) Xilinx XDMA PCIe controller driver: - Fix device node reference leak in xilinx_pl_dma_pcie_init_irq_domain() (Wentao Liang)" * tag 'pci-v7.4-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: (139 commits) PCI/pwrctrl: Power off child devices on power-on failure PCI/pwrctrl: Only destroy devices created by pwrctrl core PCI/pwrctrl: generic: Fix leaking array from of_regulator_bulk_get_all() PCI/pwrctrl: tc9563: Switch per-port reset to GPIO descriptor API PCI/pwrctrl: tc9563: Add GPIO auxiliary device support dt-bindings: PCI: toshiba,tc9563: Document embedded GPIO controller gpio: tc9563: Add support for the embedded GPIO controller PCI: qcom: Skip DWC MSI host initialization when DT 'msi-map' is present PCI: qcom: Ignore -ENODEV after Root Port reset PCI: qcom-ep: Deinitialize endpoint on remove PCI/sysfs: Reject unaligned resource I/O port accesses PCI: rcar-gen4: Add missing PM ops PCI: endpoint: pci-epf-vntb: Honor MSI-X selection PCI: endpoint: pci-epf-vntb: Use a local epf pointer in interrupt setup PCI: dwc: imx6: Use regmap_assign_bits() for conditional set/clear PCI: dwc: Describe DWC PCIe fields with full masks and FIELD_PREP() PCI: dwc: Rename pp->irq_domain to pp->msi_irq_domain PCI: dwc: Rename dw_pcie_allocate_domains() to dw_pcie_allocate_msi_domains() PCI: dwc: Correct PCIE_DW_PLAT_EP reference in Kconfig help PCI/ASPM: Disable ASPM when driver requests it ...
2026-10-22ACPI: sysfs: Finish sysfs init when creating a table file failsJamie Nguyen
If creating the file for a table fails, acpi_tables_sysfs_init() returns without sending the uevents for the tables directories, and acpi_sysfs_init() returns before creating the hotplug and pm_profile files. Stop creating table files at that point, but finish the rest of the initialization. Skipping only the failed table would give its file name to the next table with the same signature, so reading that file would return the failed table. Signed-off-by: Jamie Nguyen <jamien@nvidia.com> Link: https://patch.msgid.link/20261013193900.1258808-1-jamien@nvidia.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-10-22ACPI: sysfs: Map only the requested range in acpi_data_show()Jamie Nguyen
acpi_data_show() maps the whole data region on every read(), although it copies at most count bytes and sysfs passes at most PAGE_SIZE bytes per call. acpi_os_unmap_iomem() defers the iounmap until after an RCU grace period, so a process reading one of these files in a loop keeps many full-size mappings in flight. Map only the range being read. acpi_os_map_iomem() rounds the mapping to page boundaries, so each mapping is now at most two pages, whatever the size of the region. A malformed table can describe a region that wraps around the end of the physical address space. acpi_os_map_iomem() doesn't check for that, and its lookup of existing mappings then matches an unrelated mapping, with or without this change. Fail reads of such a region before mapping anything. Signed-off-by: Jamie Nguyen <jamien@nvidia.com> Link: https://patch.msgid.link/20261013180728.957618-1-jamien@nvidia.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-10-22ACPICA: Initialize parser_state.aml_end in acpi_install_method()Ivan Hu
In AcpiInstallMethod(), the local ParserState is stack-allocated and only ParserState.Aml was initialized. Parser helpers called by this path read ParserState.AmlEnd for bounds checking: AcpiPsPeekOpcode() reads it before validating the first AML opcode, and AcpiPsGetNextPackageEnd() reads it indirectly via AcpiPsGetNextPackageLength(). The subsequent package-limit check also compares against ParserState.AmlEnd. Because AmlEnd was never set, these checks operated on an uninitialized value, which Coverity flagged as an uninitialized read (CID 1684785) and which could lead to incorrect parser bounds decisions. Coverity report: *** CID 1684785: Memory - illegal accesses (UNINIT) /src/acpica/source/components/namespace/nsxfname.c: 712 in AcpiInstallMethod() ParserState.Aml += AcpiPsGetOpcodeSize (Opcode); >>> CID 1684785: Memory - illegal accesses (UNINIT) >>> Using uninitialized value "ParserState.AmlEnd" when calling "AcpiPsGetNextPackageEnd". ParserState.PkgEnd = AcpiPsGetNextPackageEnd (&ParserState); Initialize ParserState.AmlEnd to the end of the table (Buffer + Table->Length) so the parser bounds checks operate on a valid limit. Link: https://github.com/open-acpica/acpica/commit/19429ef91ebfb2144c918038dce13e297b4ef051 Fixes: bdc357540129 ("ACPICA: add boundary checks in two places") Signed-off-by: Ivan Hu <ivan.hu@canonical.com> Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com> Signed-off-by: Leonard Lausen <leonard@lausen.nl> [ rjw: Subject tweaks ] Link: https://patch.msgid.link/20261019145421.47181-2-leonard@lausen.nl Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-10-22ACPI: platform_profile: Separate handler locking from sysfs lifetimeDaniel Lezcano
Registration and removal currently hold profile_lock across device_unregister() and sysfs_update_group(). These operations can remove sysfs attributes and wait for their active callbacks to finish. The profile read and write callbacks acquire profile_lock themselves, so a concurrent access can deadlock: Removal/update path Active sysfs callback ------------------- --------------------- acquire profile_lock hold kernfs active reference remove a sysfs attribute wait for profile_lock wait for its active references The removal path cannot finish until the callback returns, and the callback cannot return until the removal path releases profile_lock. This applies both to per-provider device teardown and to updates of the legacy aggregate attribute group. Commit 041142d7d252 ("ACPI: platform-profile: Fix possible deadlock in platform_profile_remove()") previously fixed this lock ordering by moving sysfs_remove_group() outside profile_lock. Commit 55b1e68134bf ("ACPI: platform_profile: Use guard(mutex) for register/unregister") reintroduced the issue by extending the mutex guard over sysfs_remove_group(). Later, commit 77be5cacb2c2 ("ACPI: platform_profile: Create class for ACPI platform profile") replaced that teardown with device_unregister() and sysfs_update_group(), still under the same mutex, extending the problem to class-device teardown and aggregate attribute updates. Simply dropping profile_lock around these operations is insufficient. Aggregate operations currently discover providers through the class device list. A provider being unregistered could therefore still be selected for an aggregate read, write or cycle while its sysfs files are being torn down. Concurrent registrations and removals would also race when updating aggregate attribute visibility. Introduce profile_registration_lock to serialize registration, removal and aggregate sysfs updates. Sysfs callbacks never acquire this mutex. Retain profile_lock for profile operations and use it to protect an explicit list of handlers participating in the aggregate interface. Add a handler to that list only after device_register() succeeds. On removal, unlink it under profile_lock before calling device_unregister(). Acquiring profile_lock first waits for any aggregate operation already using the handler to complete; unlinking prevents later aggregate operations from finding it. Release profile_lock before draining sysfs callbacks, allowing active per-provider callbacks to complete before the device is released. Apply the same unlink-before-unregister ordering to registration error cleanup. Walk this list for aggregate reads, writes and profile cycling, and use its emptiness to determine aggregate attribute visibility. The class devices remain the per-provider userspace interface. There can now be an interval between removing the last handler from the list and removing the aggregate attributes. Explicitly reject choices reads and writes during that interval: the intersection bitmap starts with every bit set, so an empty traversal must not advertise all profiles or report a successful write without updating a provider. This separates aggregate membership from class device teardown while preserving the existing class and ACPI sysfs interfaces. Fixes: 55b1e68134bf ("ACPI: platform_profile: Use guard(mutex) for register/unregister") Fixes: 77be5cacb2c2 ("ACPI: platform_profile: Create class for ACPI platform profile") Signed-off-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> [ rjw: Subject adjustment, added two empty code lines ] [ rjw: Renamed profile_walk_handlers() to profile_for_each_handler() ] Link: https://patch.msgid.link/20261020144525.3265851-1-daniel.lezcano@oss.qualcomm.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-10-22ACPI: battery: Evaluate battery methods exclusivelyAli Ahmet Memiş
On ThinkPad P1 Gen2 and P53, INT3403 _TMP switches the EC page selector without taking the AML mutex the battery methods use, so _BIX and _BST running at the same time can read the wrong page. Since commit d33e89d12295 ("thermal: core: Suspend thermal zones later and resume them earlier") this happens on most resumes. Evaluate the battery methods with acpi_evaluate_object_exclusive(). Fixes: d33e89d12295 ("thermal: core: Suspend thermal zones later and resume them earlier") Reported-by: Charis Stratakis <c.stratakis@proton.me> Closes: https://lore.kernel.org/all/37N_jFulf7n-Z55NfKfE71C_wVPxYvZ0xD_iRUg2fXu7TypDiF5PStQ6siSfVBih6fThg5WoPes8U5ZQpfVm_teMFcUGXFxz2DdMbfSWuws=@proton.me/ Cc: All applicable <stable@vger.kernel.org> # 80892972ff23 ACPI: utils: Add exclusive AML evaluation helpers Signed-off-by: Ali Ahmet Memiş <aliamemis@disroot.org> Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com> Reviewed-by: Rong Zhang <i@rong.moe> Link: https://patch.msgid.link/20261018122220.678822-3-aliamemis@disroot.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-10-22ACPI: utils: Add exclusive AML evaluation helpersAli Ahmet Memiş
ACPICA drops the interpreter lock while AML waits, for example around EC accesses, so two methods can run interleaved. Some firmware relies on methods not interleaving, for instance by switching an EC page selector without taking the AML mutex that the other users of that page hold. Add acpi_evaluate_object_exclusive(), acpi_evaluate_integer_exclusive() and acpi_execute_simple_method_exclusive() which serialize the evaluation under a global mutex, for callers that are known to be affected. Suggested-by: Rafael J. Wysocki <rafael@kernel.org> Link: https://lore.kernel.org/all/CAJZ5v0gS4agVUkCO6M=VW4Wi2y1-s+k23bpzmX9aAZ0Rsv4z9Q@mail.gmail.com/ Signed-off-by: Ali Ahmet Memiş <aliamemis@disroot.org> Reviewed-by: Rong Zhang <i@rong.moe> Link: https://patch.msgid.link/20261018122220.678822-2-aliamemis@disroot.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-10-21Merge 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() ...
2026-10-21Merge 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 ...
2026-10-20Merge tag 'configfs-7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/leitao/linux Pull configfs updates from Breno Leitao: - Attribute structures can now be const (Thomas Weißschuh) - The first selftests for the configfs userspace interface, plus a sample subsystem that accepts symlinks to test against. They include a race of symlink(2) against rmdir of the target, which exercises the use-after-free fixed in v7.3-rc3. - Rust bindings, merged from Andreas Hindborg's signed tag: fix the data offset calculation in subsystem callbacks (marked for stable), add the missing Send and Sync bounds, and correct a safety comment. * tag 'configfs-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/leitao/linux: samples: configfs: constify the configfs_attribute structures configfs: Allow the registration of const struct configfs_attribute configfs: Constify configfs_bin_attribute configfs: Treat attribute structures as const internally configfs: Constify is_visible/is_visible_bin in configfs_group_operations rust: configfs: remove mutability from some field initializers selftests/configfs: race symlink against rmdir of the target selftests/configfs: cover symlink and unlink samples/configfs: add a subsystem that accepts symlinks selftests/configfs: add tests for the userspace interface rust: configfs: fix data offset calculation for subsystem callbacks rust: configfs: require thread-safe callback data rust: configfs: fix release safety documentation
2026-10-19Merge branches 'acpi-pcc', 'acpi-numa', 'acpi-pfrut', 'acpi-misc' and 'pnp'Rafael J. Wysocki
Merge updates of the ACPI PCC (Platform Communications Channel) driver, ACPI NUMA support code, ACPI Platform Firmware Runtime Update and Telemetry driver, ACPI WMI support code, and a PNP update for 7.4: - 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) - Detach device after resource transition failure in pnp_device_probe() to avoid blocking later manual PNP configuration attempts (Myeonghun Pak) * acpi-pcc: ACPI: PCC: Cache OpRegion command timeout ACPI: PCC: Free channel on OpRegion deactivation ACPI: PCC: Preserve shared memory signature in OpRegion handler * acpi-numa: ACPI: NUMA: fix typo in log message * acpi-pfrut: ACPI: pfr_update: zero-initialize capability query result * acpi-misc: ACPI: WMI: use IS_ENABLED() to simplify built-in or module check * pnp: PNP: Detach device after resource transition failure
2026-10-19Merge branches 'acpi-battery', 'acpi-sbs', 'acpi-button' and 'acpi-video'Rafael J. Wysocki
Merge updates of the ACPI battery, ACPI SBS (Smart Battery System), ACPI button, and ACPI video bus device drivers for 7.4: - 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) * acpi-battery: ACPI: battery: Fix bogus cycle count values on systems without _BIX * acpi-sbs: ACPI: SBS: Fix NULL pointer dereference on allocation failure ACPI: SBS: report relative state of charge as CAPACITY * acpi-button: ACPI: button: Add lid_init_state quirk for Razer Blade Stealth 13 (Early 2020) RZ09-0310 * acpi-video: ACPI: video: force native backlight on Dell OptiPlex AIO 7410 35W ACPI: video: add backlight=native DMI quirk on Acer Nitro AN515-58
2026-10-19Merge branch 'acpi-driver'Rafael J. Wysocki
Merge changes related to ACPI support in device drivers for 7.4: - 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) * acpi-driver: 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() ACPI: Add stub for acpi_find_child_device() ACPI: bus: Provide !ACPI stub for acpi_device_uid() ALSA: hda: aw88399: Switch to use acpi_bus_get_primary_device() ASoC: loongson: Switch to use acpi_bus_get_primary_device() ASoC: intel: boards: Switch to use acpi_bus_get_primary_device() ASoC: amd: acp3x-es83xx: Switch to use acpi_bus_get_primary_device() ASoC: amd: acp-es8336: Switch to use acpi_bus_get_primary_device() thunderbolt: Switch to use acpi_bus_get_primary_device() platform/x86: apple-gmux: Switch to use acpi_bus_get_primary_device() platform/x86: x86-android-tablets: Use acpi_bus_get_primary_device() platform/x86: serdev_helpers: Switch to use acpi_bus_get_primary_device() platform/x86: yogabook: Switch to use acpi_bus_get_primary_device() ACPI: amba: Switch to use acpi_bus_get_primary_device() ACPI: bus: Use acpi/acpi_bus.h without CONFIG_ACPI
2026-10-19Merge branches 'acpica' and 'acpi-thermal'Rafael J. Wysocki
Merge ACPICA updates and ACPI thermal control updates for 7.4: - 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 instread 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) * acpica: ACPICA: actbl2.h: Add bit constants of the Flags field in the IOVT IOMMU structure ACPICA: Fix PCC OperationRegion command offsets ACPICA: Fix memory leak in acpi_ds_create_field() * acpi-thermal: ACPI: fan: Use __free() to simplify AML error handling ACPI: thermal: Fix acpi_thermal_guess_offset() for device with a 273.0°K offset ACPI: fan: Use more suitable cooling device data ACPI: fan: Store ACPI device pointer in struct acpi_fan ACPI: processor: thermal: Use more suitable cooling device data ACPI: thermal: Use cooling device parent for thermal zone binding ACPI: fan: Use thermal_cooling_device_create() ACPI: video: Use thermal_cooling_device_create() ACPI: processor: thermal: Use thermal_cooling_device_create() thermal: core: Introduce thermal_cooling_device_create() ACPI: video: Fix backlight unregistration ordering ACPI: fan: Fix memory leak due to leftover devm_kcalloc() argument
2026-10-16Merge an ACPI fan driver cleanup for 7.4Rafael J. Wysocki
2026-10-16Merge branches 'acpi-pci' and 'acpi-apei'Rafael J. Wysocki
Merge an ACPI support change related to PCI and ACPI APEI support updates for 7.4: - 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) * acpi-pci: ACPI: PCI: pci_link: clear driver_data before free * acpi-apei: ACPI: APEI: accumulate the queued flag across error sections PCI/AER: Map a raw AER Capability image field by field Documentation: ACPI: EINJ: Update stale driver source reference cxl/ras: Make cxl_cper_handle_prot_err() static ACPI: APEI: GHES: Bound AER info copy and sanitize software metadata ACPI: APEI: GHES: Validate memory error section length before payload access efi/cper: Read only validated fields in cper_mem_err_pack() ACPI: APEI: GHES: Validate CXL protocol error section length before RAS cap copy ACPI: APEI: GHES: Bound CXL event record copy to the firmware section length ACPI: extlog: Fix CONFIG_ACPI_APEI_PCIEAER guard typo ACPI: extlog: Validate PCIe error section length before payload access ACPI: extlog: Avoid populating software AER metadata from raw hardware buffer ACPI: extlog: Defer CXL protocol error handling to avoid lock inversion ACPI: extlog: Validate elog record length before walking sections efi/cper: Reject an error status block length that wraps a u32 efi/cper: Reject CPER records with an out-of-range error_data_length
2026-10-16Merge branches 'acpi-tables', 'acpi-osl', 'acpi-utils' and 'acpi-pm'Rafael J. Wysocki
Merge ACPI table parser updates, an ACPI OS services layer (OSL) update, ACPI utility API updates, and ACPI power management updates for 7.4: - 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) - Add quirks to avoid turning off unused ACPI power resources on Acer Swift 3 SF314-56G (MX250), Casper Excalibur G900, and Acer Aspire A515-53G (Matthias Dittrich, Hakan Abay, Krittikun Wongnin) - Drop unused sleep_no_lps0 define from the generic ACPI system sleep handling code (Riwen Lu) * acpi-tables: ACPI: HMAT: preserve hmat_adist_nb notifier block ACPI: tables: handle failed initrd override mappings ACPI: MRRM: Use for_each_populated_zone() in get_node_num() * acpi-osl: ACPI: OSL: Use vsnprintf() in acpi_os_vprintf() * acpi-utils: ACPI: utils: Ignore leading root scope prefix in string _UID match ACPI: utils: Adjust message printing macros for ACPI objects * acpi-pm: ACPI: PM: Add Acer Aspire A515-53G to dmi_leave_unused_power_resources_on[] ACPI: PM: sleep: Drop unused sleep_no_lps0 define ACPI: PM: Add unused power resource quirk for Casper Excalibur G900 ACPI: PM: Add quirk for Acer Swift 3 SF314-56G (MX250) ACPI: PM: s2idle: Add _Ixx GPE wake indicator support
2026-10-16Merge 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()
2026-10-16configfs: Constify configfs_bin_attributeThomas Weißschuh
The configfs_bin_attribute structures defined by driver are never modified. Make them const. As there are only two users of these attributes, adapt them in the same commit to avoid a phased transition. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Andreas Hindborg <a.hindborg@kernel.org> Link: https://patch.msgid.link/20260716-configfs-const-base-v1-4-c545a4053cb5@weissschuh.net Signed-off-by: Breno Leitao <leitao@debian.org>
2026-10-14ACPI: PM: Add Acer Aspire A515-53G to dmi_leave_unused_power_resources_on[]Krittikun Wongnin
On the Acer Aspire A515-53G (Whiskey Lake + NVIDIA GeForce MX230), the dGPU behind root port RP05 (00:1c.4) falls off the bus during boot and is unusable until the next power cycle: nvidia 0000:02:00.0: Unable to change power state from D3cold to D0, device inaccessible NVRM: The NVIDIA GPU 0000:02:00.0 ... has fallen off the bus The firmware ships two SSDTs which both provide power management for the dGPU: - One SSDT defines \_SB.PCI0.RP05.PC01 together with RP05._PR0/_PR2/_PR3 = { PC01 }. - A second SSDT defines \_SB.PCI0.RP05.PCRP (_STA initially One, _OFF calls \_SB.PCI0.HGOF, which puts the link into L2/L3 and drops the dGPU power enable GPIO) and its own RP05._PR0/_PR2/_PR3/_S0W. The latter fail to load: ACPI BIOS Error (bug): Failure creating named object [\_SB.PCI0.RP05._PR0], AE_ALREADY_EXISTS As a result PCRP is not referenced by any device and acpi_turn_off_unused_power_resources() turns it off right after the ACPI namespace scan. This cuts power to the dGPU, but PC01 still believes it is on, so its _ON method is a no-op when the PCI core later tries to bring the GPU back to D0. Windows does not turn off unused power resources, so the dGPU works there. Add the machine to dmi_leave_unused_power_resources_on[], like the THUNDEROBOT ZERO which has a similar SSDT bug. With this change the dGPU stays on the bus and the nvidia driver binds. Runtime PM of the dGPU is unaffected, as it is handled through PC01: with no driver bound and power/control set to auto, RP05 reaches D3cold and the GPU comes back to D0 on resume. Link: https://lore.kernel.org/r/CADS-TgDQ1G8vrTQLJeQ3RTBVFTyMe0C+5p2=UBKS=EFCDFuaxw@mail.gmail.com/ Signed-off-by: Krittikun Wongnin <krittikunwongnin@gmail.com> [ rjw: Subject and changelog tweaks ] Link: https://patch.msgid.link/20261013074245.4327-1-krittikunwongnin@gmail.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-10-13ACPI: video: Remove CONFIG_X86 handling from nvidia_wmi_ec_supported()Armin Wolf
The WMI-ACPI driver now supports architectures other than x86. Remove the CONFIG_X86 handling from video-detect and the associated drivers to simplify the resulting code. Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org> Signed-off-by: Armin Wolf <W_Armin@gmx.de> Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patch.msgid.link/20260724025959.142826-3-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2026-10-12ACPI: video: force native backlight on Dell OptiPlex AIO 7410 35WChitransh Mandhaniya
The Dell OptiPlex AIO 7410 35W (board 01KP8D) declares DELL0501 in its ACPI DSDT (status = 0x0F) even though no UART scalar board is physically present. This causes acpi_video_get_backlight_type() to return acpi_backlight_dell_uart, which makes i915 skip registering intel_backlight. The dell-uart-backlight driver then times out talking to the absent board and the probe fails, leaving the machine with zero backlight control. A BIOS update fixes this on some models (e.g. OptiPlex 7420, board 0914RT) by setting DELL0501 _STA to 0, but Dell has not shipped a corrected BIOS for the 7410 even in the latest release (1.37.0, 2026-05-28). Add a DMI quirk to force native backlight on this model so that i915 registers intel_backlight and brightness control works out of the box. Tested on: - OptiPlex AIO 7410 35W (01KP8D, BIOS 1.37.0) -- confirmed acpi_backlight=native produces working intel_backlight (raw, max=96000), DMI quirk has the same effect. - OptiPlex AIO 7420 35W (0914RT, BIOS 1.27.0) -- DELL0501 absent in updated BIOS, intel_backlight works natively (no regression). Signed-off-by: Chitransh Mandhaniya <Chitransh_Mandhaniya@dell.com> Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com> Link: https://patch.msgid.link/20261010124830.116750-1-chitranshmandhaniya@gmail.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-10-12ACPI: PM: sleep: Drop unused sleep_no_lps0 defineRiwen Lu
The sleep_no_lps0 stub define in the !CONFIG_ACPI_SLEEP branch of sleep.c has no users left in that file: the LPS0 code consuming it was moved to drivers/acpi/x86/s2idle.c by commit fef98671194b ("ACPI: PM: s2idle: Move x86-specific code to the x86 directory"), which has its own static module parameter of the same name, so the define is no longer used. Drop it. Signed-off-by: Riwen Lu <luriwen@kylinos.cn> Link: https://patch.msgid.link/20261008025152.153073-1-luriwen@kylinos.cn Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-10-12ACPI: PM: Add unused power resource quirk for Casper Excalibur G900Hakan Abay
On the Casper Excalibur G900, the NVIDIA discrete GPU and the second NVMe device become inaccessible when unused ACPI power resources are turned off during initialization. The failure is similar to the THUNDEROBOT ZERO case addressed by commit cd7ef20ba8c6 ("ACPI: PM: Add unused power resource quirk for THUNDEROBOT ZERO"). Without the quirk, the NVIDIA GPU and the second NVMe device are left inaccessible in D3cold and attempts to transition them back to D0 fail. Add a DMI quirk for the affected Casper Excalibur G900 with NLCC 001 mainboard to leave unused ACPI power resources on. With the quirk applied, the second NVMe device remains accessible. The NVIDIA GPU can enter D3cold while idle and subsequently return to D0 for accelerated rendering. Link: https://bugs.kali.org/view.php?id=9891 Signed-off-by: Hakan Abay <hakan.abay84@gmail.com> Link: https://patch.msgid.link/20261005174939.53873-1-hakan.abay84@gmail.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-10-12ACPI: dock: Retry probing battery docks after hotplugVibhor Goel
On a ThinkPad T480 booted with the removable battery absent, reinserting that battery can leave BAT1 missing from /sys/class/power_supply even after firmware sends an ACPI add notification. The battery dock platform device already exists, but its driver did not bind while the battery was absent. During hotplug, acpi_bus_scan() updates the ACPI device and attempts to attach it on the ACPI bus. acpi_create_platform_device() does not create another platform device because the existing physical node is still associated with the ACPI device. Consequently, the existing platform device remains unbound. Retry probing the battery dock platform device after hotplug_dock_devices() has refreshed the ACPI state. Restrict this to battery docks. If the platform device is already bound, device_initial_probe() leaves that binding in place. Signed-off-by: Vibhor Goel <vibhor1102@gmail.com> [ rjw: Add empty code line after a conditional ] Link: https://patch.msgid.link/20261003164019.11195-1-vibhor1102@gmail.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-10-12ACPI: PCI: pci_link: clear driver_data before freeJiale Yao
acpi_pci_link_remove() frees the link object without clearing the ACPI device's driver_data pointer. The ACPI device survives hot-removal and can later be retrieved by acpi_fetch_acpi_dev(), leaving callers with a dangling pointer. Clear driver_data before freeing the link. Fixes: db89b4f0dbab ("ACPI: catch calls of acpi_driver_data on pointer of wrong type") Signed-off-by: Jiale Yao <yaojiale02@163.com> [ rjw: Subject tweak ] Link: https://patch.msgid.link/20260925155846.2381956-1-yaojiale02@163.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>