mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
v7.3-rc1
10897 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
3b446d169a |
Revert "ACPI: scan: Defer device power initialization"
Revert commit |
||
|
|
3382bfbca5 |
More ACPI support updates for 7.3-rc1
- Update MAINTAINERS, CREDITS and ACPI subsystem documentation to
reflect recent changes in the upstream ACPICA project (Rafael
Wysocki)
- Prevent the core ACPI enumeration code from combining device
resources that overlap completely in order to avoid resource
conflicts during platform device registration because there are
drivers that expect such resources to be present (Rafael Wysocki)
- Defer device power initialization during ACPI-based device
enumeration to the point when the given device is known to be present
and functional and all of its dependencies have been met (Peixin Xie)
- Fix bus ID cleanup on device_add() failures during ACPI device object
registration (Hongyan Xu)
- Introduce a new helper function for looking up the primary "physical"
device for a given ACPI device object and update the core ACPI device
enumeration code to use that function (Rafael Wysocki)
- Protect all battery properties with a separated mutex in the ACPI
battery driver to prevent race conditions from occurring and avoid
evaluating the _BST ACPI control method multiple times in parallel
for the same battery device (Rong Zhang)
- Add DMI quirk for the Razer Blade Pro 17 early 2020 lid switch to the
ACPI button driver (Robin Everaars)
- Convert fixed clock rates in the ACPI driver for AMD SoCs (APD) to
use HZ_PER_MHZ and add a clock frequency for the HJMC01 I2C
controller to it (Hongnan Li and Xiangyang Yu)
- Fix a stack buffer overflow in query_capability() in the ACPI
platform firmware runtime update driver (Anirudh Prasad)
-----BEGIN PGP SIGNATURE-----
iQFGBAABCAAwFiEEcM8Aw/RY0dgsiRUR7l+9nS/U47UFAmqPL0oSHHJqd0Byand5
c29ja2kubmV0AAoJEO5fvZ0v1OO1RrYH/AgB9tvwsenlB1jp2JxOqZhzuaKezH66
wRAddLVPg4Goc6XV6EUFZZi47PpAbgUPvRFhxBXu8oxY4W9g8Ak3BKxAefcjH2Gh
WhGxAo51Be/4PskO47e29CUf1pWlMD9QeffIxBFqB5uqJ48/E2WDdstsR8tUazKL
6n7APE9udaL/xNAvGvgXEmhrj6hdhMhQfiQISOrcHGtbNd1AIsVrfC4BRi/qCjdv
s385YtkAtY0xgfu3s6HmjtUQxJ0Isse5dhgDCC5cb05pFxItPqmCPgUY8VYCWqml
07EfplwaOBBv9IxAuBTyB9gl7E/WDxg9cVTPy6Hm2TZ9PeIFXK2NvI4=
=Jtbh
-----END PGP SIGNATURE-----
Merge tag 'acpi-7.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull more ACPI support updates from Rafael Wysocki:
"These update documentation to reflect recent changes in the upstream
ACPICA project, fix issues in the core ACPI device enumeration code
(one of which has been introduced recently), improve the primary
"physical" device lookup for ACPI device objects in that code, and
update ACPI device drivers:
- Update MAINTAINERS, CREDITS and ACPI subsystem documentation to
reflect recent changes in the upstream ACPICA project (Rafael
Wysocki)
- Prevent the core ACPI enumeration code from combining device
resources that overlap completely in order to avoid resource
conflicts during platform device registration because there are
drivers that expect such resources to be present (Rafael Wysocki)
- Defer device power initialization during ACPI-based device
enumeration to the point when the given device is known to be
present and functional and all of its dependencies have been met
(Peixin Xie)
- Fix bus ID cleanup on device_add() failures during ACPI device
object registration (Hongyan Xu)
- Introduce a new helper function for looking up the primary
"physical" device for a given ACPI device object and update the
core ACPI device enumeration code to use that function (Rafael
Wysocki)
- Protect all battery properties with a separated mutex in the ACPI
battery driver to prevent race conditions from occurring and avoid
evaluating the _BST ACPI control method multiple times in parallel
for the same battery device (Rong Zhang)
- Add DMI quirk for the Razer Blade Pro 17 early 2020 lid switch to
the ACPI button driver (Robin Everaars)
- Convert fixed clock rates in the ACPI driver for AMD SoCs (APD) to
use HZ_PER_MHZ and add a clock frequency for the HJMC01 I2C
controller to it (Hongnan Li and Xiangyang Yu)
- Fix a stack buffer overflow in query_capability() in the ACPI
platform firmware runtime update driver (Anirudh Prasad)"
* tag 'acpi-7.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPI: button: Add DMI quirk for Razer Blade Pro 17 early 2020 lid switch
ACPI: scan: Do not combine resources that overlap completely
ACPI: Update upstream ACPICA repository URL in documentation
ACPI: Update MAINTAINERS entry for ACPICA
ACPI: Add Bob Moore to CREDITS
ACPI: pfr_update: fix stack buffer overflow in query_capability()
ACPI: scan: Defer device power initialization
ACPI: APD: Add clock frequency for HJMC01 I2C controller
ACPI: APD: Convert fixed clock rates to use HZ_PER_MHZ
ACPI: scan: Use acpi_bus_get_primary_device()
ACPI: platform: Use acpi_bus_get_primary_device()
ACPI: bus: Introduce acpi_bus_get_primary_device()
ACPI: scan: fix bus ID cleanup on device_add() failures
ACPI: battery: Protect all properties with a separated mutex
|
||
|
|
ea10c0b334 |
Merge branches 'acpi-battery', 'acpi-button', 'acpi-soc' and 'acpi-pfrut'
Merge updates of assorted ACPI drivers for 7.3-rc1: - Protect all battery properties with a separated mutex in the ACPI battery driver to prevent race conditions from occurring and avoid evaluating the _BST ACPI control method multiple times in parallel for the same battery device (Rong Zhang) - Add DMI quirk for Razer Blade Pro 17 early 2020 lid switch to the ACPI button driver (Robin Everaars) - Convert fixed clock rates in the ACPI driver for AMD SoCs (APD) to use HZ_PER_MHZ and add a clock frequency for the HJMC01 I2C controller to it (Hongnan Li and Xiangyang Yu) - Fix a stack buffer overflow in query_capability() in the ACPI platform firmware runtime update driver (Anirudh Prasad) * acpi-battery: ACPI: battery: Protect all properties with a separated mutex * acpi-button: ACPI: button: Add DMI quirk for Razer Blade Pro 17 early 2020 lid switch * acpi-soc: ACPI: APD: Add clock frequency for HJMC01 I2C controller ACPI: APD: Convert fixed clock rates to use HZ_PER_MHZ * acpi-pfrut: ACPI: pfr_update: fix stack buffer overflow in query_capability() |
||
|
|
bbc981bd54 |
Merge branch 'acpi-bus'
Merge changes related to primary "physical" device lookup for a given ACPI device object that include the introduction of a new lookup helper function and core ACPI device enumeration code updates putting that new function to use (Rafael Wysocki) * acpi-bus: ACPI: scan: Use acpi_bus_get_primary_device() ACPI: platform: Use acpi_bus_get_primary_device() ACPI: bus: Introduce acpi_bus_get_primary_device() |
||
|
|
4c2cebc89d |
Merge branch 'acpi-scan'
Merge core ACPI device enumeration code changes for 7.3-rc1: - Prevent the core ACPI enumeration code from combining device resources that overlap completely in order to avoid resource conflicts during platform device registration because there are drivers that expect such resources to be present (Rafael Wysocki) - Defer device power initialization during ACPI-based device enumeration to the point when the given device is known to be present and functional and all of its dependencies have been met (Peixin Xie) - Fix bus ID cleanup on device_add() failures during ACPI device object registration (Hongyan Xu) * acpi-scan: ACPI: scan: Do not combine resources that overlap completely ACPI: scan: Defer device power initialization ACPI: scan: fix bus ID cleanup on device_add() failures |
||
|
|
415125669c |
ACPI: button: Add DMI quirk for Razer Blade Pro 17 early 2020 lid switch
The lid switch reports "close" but can miss the matching "open", leaving _LID closed after resume. systemd-logind then suspends the system again roughly every 35 seconds. Reading the embedded controller's PSTA byte while _LID is stale shows that bit 0x04 is set, which the DSDT treats as open. The DSDT returns the cached LIDS byte from _LID. Its wake path aborts in RTEC on an unhandled SystemCMOS region before copying PSTA to LIDS. Initialize the lid state to open on resume, matching the existing quirk for the Razer Blade Stealth 13 late 2019. With button.lid_init_state=open, a physical close suspended once and resume reported open without another suspend. Signed-off-by: Robin Everaars <robineveraars@pm.me> Link: https://patch.msgid.link/20260817141414.213075-1-robineveraars@pm.me Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> |
||
|
|
7617cc05df |
ACPI: scan: Do not combine resources that overlap completely
Commit |
||
|
|
920f27122c |
CXL for v7.3
CXL core type2 support: cxl: Support dpa without a mailbox cxl: Support Type2 cxl regs mapping CXL test type2 support: cxl/test: Rework cxl_type2_mem_init() to use cxl_mock_platform_device_add() cxl/test: Add cxl_test accelerator driver cxl/test: Fixup hdm init for auto region to support type2 cxl/test: Propagate -ENOMEM on platform_device_alloc() failures cxl/test: Add hierarchy enumeration support for type2 device cxl/test: Refactor platform device enumerations cxl/test: Add type2 support for mock CFMWS0 cxl/test: Add test for module parameters CXL port error handling support prep patches: cxl: Rename find_cxl_port() to find_cxl_port_by_dport() cxl: Tighten CPER kfifo registration API and symbol visibility acpi/apei/ghes: Use raw_spinlock_t for CXL CPER work locks cxl/ras: Fix cxl_rch_get_aer_severity() wrong severity register cxl/ras: Fix cxl_rch_get_aer_info() out-of-bounds AER register read CXL misc patches: cxl/Documentation: Spell out globbed sysfs attribute names cxl/test: Assign one mock memdev a full-width serial number cxl/core: Format the memdev serial number as unsigned in TP_printk cxl/pmem: Format the nvdimm serial number as unsigned decimal cxl: Use %pe to print error pointers cxl: Deny Features commands on the RAW mailbox path CXL fixes: cxl/region: Use __free(put_device) in find_pos_and_ways() cxl/region: Fix use-after-free in find_pos_and_ways() error path cxl/features: Clamp Get Feature output size to the remaining buffer cxl/features: Reject Set Features output buffer smaller than the header cxl/features: Reject Get Feature count larger than the output buffer cxl/port: Restart port enumeration when a sibling adds the dport first cxl/features: Serialize multi-part Get/Set Feature transfers cxl/pci: Honor -EPROBE_DEFER from component register setup cxl/mbox: Break poison list loop on an empty payload cxl/memdev: Fix firmware upload exact-fit handling cxl/features: bound fwctl command payload to the input buffer cxl/mce: Make the MCE notifier per-region cxl/pci: Remove incorrect mbox.valid check in cxl_pci_type3_init_mailbox() cxl: docs/linux/dax-driver - fix typos cxl: fix mailbox return code description typo cxl/mbox: Clamp mailbox output allocation to the payload size -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE5DAy15EJMCV1R6v9YGjFFmlTOEoFAmqDPQEACgkQYGjFFmlT OEqNBw/+LP25RACa3Jtwb53KtycNi/MzyVBXV311rDaBGzSKUixkO9LYCIV76lI/ 86x+U7+fmXBTmynD8lNwgVUw2P18xguYPe3bfn9qlmC2AZ6zmyeEzRU4p4BRzxTv iE9utK7DLetNRLGMnYIz3ziHLaSaZf0RslvecXF61y+nNhfd5N/pg52Bw1dUdpRi 91m8v0JJ+v+OtEKwCsinV4lck07WRmk+roCFFqcwIdR4GkhKBKiipf+Vv9EoR/k5 zBkhPazWFNKmnvf3VAY+vvo/Nh+wmHOrLqJUi5QYOQDXUGiJgt6/2JDVDBrY+QZL 1I7BN66d4PE7lQnYpZHnu/aSlhcV/QI/4tKRnt1eZ7kIFO0s7QbPo7Fg8+Ql+43m V/qYWPxC6BgQXHBYAcnvJZO6COL1EIG1+sGy+x6kInTn33KPBeit6Ru7c3wxmYFa jXfdrudfN+0fUtjEhrMb2IIxfhNV5O/wLQqlj2c8vXgRmZo9dElyyiIxOC87EnOG sWD2Z+4z9Id4egU6bU5iTdVdT+CW0WkUHAd9gtmYwlr9Ttrqh01CTu7vc0XEKyKS j5YU/3sV2H8KbU5PqVo9GeYRukylESe+w42+7UemBUSzX6OIDaiNNokmDt9L+Cg7 pdBr1qzjasR7XIDXNP9IRdkPKTgqDbSrg/gVIZJe+j7OsUHu0Nw= =6Bd/ -----END PGP SIGNATURE----- Merge tag 'cxl-for-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl Pull CXL updates from Dave Jiang: "This includes the remaining patches to complete the basic support for CXL type2 (accelerators) drivers by the CXL core. A set of unit testing support to catch regressions for the CXL core type2 exported functions has also been added. The actual CXL type 2 driver support for the AMD Solarflare NIC driver has been picked up by net-dev. A set of preparatory patches has been picked up from the CXL port error handling series in order to reduce the number of patches in that series for review. The rest of that series is getting close to be merged but was not ready for the 7.3 merge window. There are also a number of misc patches and a large number of bug fixes against pre-existing issues flagged by sashiko reviews as contributors post new patches on the mailing list. We will continue to work through the sashiko raised issues as they show up." * tag 'cxl-for-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: (35 commits) cxl/Documentation: Spell out globbed sysfs attribute names cxl: Rename find_cxl_port() to find_cxl_port_by_dport() cxl: Tighten CPER kfifo registration API and symbol visibility acpi/apei/ghes: Use raw_spinlock_t for CXL CPER work locks cxl/ras: Fix cxl_rch_get_aer_severity() wrong severity register cxl/ras: Fix cxl_rch_get_aer_info() out-of-bounds AER register read cxl/test: Assign one mock memdev a full-width serial number cxl/core: Format the memdev serial number as unsigned in TP_printk cxl/pmem: Format the nvdimm serial number as unsigned decimal cxl: Use %pe to print error pointers cxl/region: Use __free(put_device) in find_pos_and_ways() cxl/region: Fix use-after-free in find_pos_and_ways() error path cxl: Deny Features commands on the RAW mailbox path cxl/features: Clamp Get Feature output size to the remaining buffer cxl/features: Reject Set Features output buffer smaller than the header cxl/features: Reject Get Feature count larger than the output buffer cxl/port: Restart port enumeration when a sibling adds the dport first cxl/features: Serialize multi-part Get/Set Feature transfers cxl/pci: Honor -EPROBE_DEFER from component register setup cxl/mbox: Break poison list loop on an empty payload ... |
||
|
|
073e62fd33 |
RISC-V updates for v7.3
- Add initial definitions and discovery for the Smcsrind, Sscsrind, Smcntrpmf, Ssccfg, Smcdeleg, Zicclsm, Ziccamoa, Ziccif, Ziccrse, Za64rs, and Ssqosid RISC-V ISA extensions - Improve the RISC-V update_mmu_cache_range() implementation by using flush-by-ASID, enabling performance improvements on microarchitectures that support related optimizations; and by taking advantage of the Svinval RISC-V ISA extension on microarchitectures that support it - Shrink CFI shadow stack allocation further (to 512MB) to save virtual address space (and physical memory on systems with strict overcommit policies) - Add initial CPU context switch support for QoS tagging (Ssqosid) - Change our vector misaligned access speed test code to be synchronous, avoiding a bunch of bugs related to unnecessary asynchronicity - Enable ARCH_HAS_ACPI_TABLE_UPGRADE for RISC-V to help with ACPI table debugging (similar to ARM64 and x86) - Extract vDSO section offsets at build time, rather than run time, to avoid the boot time overhead - Use assembler directives to control the use of instructions from the RISC-V ISA extensions Zacas and Zabha, rather than compiler -march flags that could affect the whole kernel (similar to ARM64) - Add a kselftest for kprobes support for the c.jal instruction on RISC-V - When UEFI runtime services are available, use them to restart and power off - Fix ARCH_HAS_ACPI_TABLE_UPGRADE for RISC-V by adding a missing include file to the ACPI code - Move contiguous DMA memory reservation later in the boot, to ensure that the correct global and per-node pools are allocated when CONFIG_CMA_SIZE_PERNUMA is enabled - Disallow probes on breakpoint handlers to avoid recursing indefinitely into do_trap_break() - Patch the compat vDSO during runtime alternatives processing, not only the standard vDSO - Remove some leftover XIP support elements missed by commit |
||
|
|
ced45be007 |
ACPI: pfr_update: fix stack buffer overflow in query_capability()
query_capability() copies four ACPI buffer objects returned by the
firmware _DSM into fixed-size u8[16] fields in struct
pfru_update_cap_info using memcpy with the firmware-supplied length:
memcpy(&cap_hdr->code_type,
elements[CAP_CODE_TYPE_IDX].buffer.pointer,
elements[CAP_CODE_TYPE_IDX].buffer.length);
The same pattern repeats for drv_type, platform_id, and oem_id.
If the firmware returns buffer.length > 16 for any of these fields,
memcpy writes past the destination array.
struct pfru_update_cap_info is stack-allocated in pfru_ioctl().
Confirmed with KASAN on 7.2-rc6: three stack-out-of-bounds reports
are generated when a DSM returns 64-byte buffers, with writes reaching
44 bytes past the end of cap_hdr's [64, 156) frame window into
adjacent stack redzones.
Introduce a helper pointer to out_obj->package.elements and use it
to validate each buffer length against its destination field size
before copying, returning -EINVAL if the firmware supplies an
oversized buffer.
Fixes:
|
||
|
|
dc948f8b38 |
ACPI: scan: Defer device power initialization
acpi_bus_get_power_flags() initializes the device power state while the ACPI device object is being created, before checking whether the device is ready for enumeration. If enumeration is deferred, acpi_bus_attach() clears the initialized and power_manageable flags. When the dependency is later satisfied, acpi_bus_init_power() is called again and takes additional references to the power resources used by the device. These references prevent the resources from being turned off when the device enters D3. This issue was reproduced on a SpacemiT K3 RISC-V Pico-ITX. The affected device uses a power resource through _PR0 and has an automatically derived dependency on its interrupt controller. The initial power initialization acquires a power resource reference. The device is then deferred, but that reference is not dropped. When the dependency becomes available, power initialization acquires another reference. Consequently, entering D3 only drops the reference count from 2 to 1 and _OFF is not evaluated: [ 0.314611] ACPI Debug: "I2P2 _STA" [ 0.318260] ACPI: \_SB_.I2P2: ACPI: PM: Power resource is on [ 0.323998] ACPI: \_SB_.I2P2: New power resource [ 0.382108] ACPI Debug: "I2P2 _STA" [ 0.478964] ACPI Debug: "I2P2 _ON" [ 0.482498] ACPI: \_SB_.I2P2: ACPI: PM: Power resource turned on [ 0.488597] ACPI Debug: "I2C2, PS0" [ 0.863170] ACPI: \_SB_.I2P2: ACPI: PM: Power resource already on [ 0.873686] ACPI Debug: "I2C2, PS0" [ 2.416055] ACPI Debug: "I2C2, PS3" [ 2.423397] ACPI: \_SB_.I2P2: ACPI: PM: Power resource still in use To address this, remove the early acpi_bus_init_power() call and leave regular ACPI device objects uninitialized until acpi_bus_attach() runs after the device is ready for enumeration. Power resource objects are initialized through acpi_add_power_resource() and do not require the generic initialization in acpi_bus_attach(), so mark them as initialized there. After the change, device power state initialization is deferred until its dependency is met. Since no reference is acquired before then, the power resource left on by firmware is turned off as unused after the namespace scan. Once the dependency is met, the resource is turned on once for the device and is turned off normally when the device later enters D3: [ 0.314628] ACPI Debug: "I2P2 _STA" [ 0.318277] ACPI: \_SB_.I2P2: ACPI: PM: Power resource is on [ 0.324016] ACPI: \_SB_.I2P2: New power resource [ 0.382118] ACPI Debug: "I2P2 _STA" [ 0.496116] ACPI: \_SB_.I2P2: ACPI: PM: Turning OFF [ 0.501081] ACPI Debug: "I2P2 _OFF" [ 0.504705] ACPI: \_SB_.I2P2: ACPI: PM: Power resource turned off [ 1.415899] ACPI Debug: "I2P2 _ON" [ 1.418866] ACPI: \_SB_.I2P2: ACPI: PM: Power resource turned on [ 1.424947] ACPI Debug: "I2C2, PS0" [ 2.647655] ACPI Debug: "I2C2, PS3" [ 2.654856] ACPI Debug: "I2P2 _OFF" [ 2.654866] ACPI: \_SB_.I2P2: ACPI: PM: Power resource turned off This also avoids powering up devices before their dependencies are available. Signed-off-by: Peixin Xie <peixin.xie@linux.spacemit.com> [ rjw: Changelog edits ] Link: https://patch.msgid.link/20260820-acpi-power-resource-ref-fix-v2-1-29818173ea13@linux.spacemit.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> |
||
|
|
59e6295fac |
Driver core changes for 7.3-rc1
- container_of:
- Apply typeof_member(), remove the local __mptr variable to eliminate
variable shadowing warnings on nested container_of() calls, and remove
unnecessary parentheses.
- core:
- Add driver name to probe debug print for initcall_debug.
- Avoid repeatedly printing the same 'Fixed dependency cycle' log.
- Unwind device_add() on attribute creation failure in
attribute_container_add_class_device().
- Remove statistics group if encryption group creation fails in
transport_add_class_device().
- debugfs:
- Fix lockdown check for mmap_prepare().
- Warn if file creation failed due to uninitialized debugfs.
- device property:
- Implement fw_devlink support for software nodes by adding
software_node_add_links(), which creates fwnode links from DEV_PROP_REF
properties to enable automatic probe ordering. Add kunit-managed fwnode
helpers and test coverage.
- Fix infinite loop in fwnode_for_each_child_node() when the secondary fwnode
has more than one child. Add test cases.
- Fix out-of-bounds access in software_node_get_reference_args() when called
with index -1 (UINT_MAX).
- Refactor to use RAII approach with __free().
- Add Bartosz Golaszewski as software node reviewer.
- firmware loader:
- Fix race where a sysfs fallback request can complete before being queued as
pending, leading to a use-after-free on the next fallback request.
- Reject 0-size built-in firmware and fail the build on empty firmware files
in CONFIG_EXTRA_FIRMWARE.
- kobject:
- Provide __KOBJ_ATTR() and __KOBJ_ATTR_RO/WO() initialization macros and
allow the constification of kobject attributes, enabling them to reside in
read-only memory.
- platform:
- Provide platform_device_set_of_node(), platform_device_set_fwnode(), and
platform_device_set_of_node_from_dev() helpers that encapsulate firmware
node reference counting for dynamically allocated platform devices. Convert
all in-tree users that manually assigned dev.of_node or dev.fwnode, fixing a
pre-existing refcount bug in powermac. Switch to counting references of all
firmware node types, not only OF nodes.
- Unify the release path for dynamically allocated platform devices by
removing platform_device_release_full(). Amend the fwnode setter API
contract to warn if a primary software node is overwritten. Add KUnit tests
for correct software node removal on device unregistration.
- Rust:
- Auxiliary:
- Add registration_data_with() closure-based API for invariant ForLt types.
- Debugfs:
- Migrate BinaryWriter and BinaryReaderMut trait requirements from
kernel::transmute traits to zerocopy traits.
- Device:
- Add BoundInternal device context and InternalBoundContext trait for bus
abstractions that need internal access to a bound device.
- Make the lifetime on Core and CoreInternal invariant to prevent coercion
to shorter lifetimes.
- Devres:
- Fix race between concurrent revokers where the losing revoker could return
before the winning revoker finished dropping the inner data, causing
use-after-free.
- Ensure revocation is complete before the device finishes unbinding by
making the synchronization bidirectional.
- Add DevresLt<F: ForLt>, a wrapper around Devres that shortens 'static back
to the caller's borrow scope. Implement ForLt and CovariantForLt for Bar,
IoMem, and ExclusiveIoMem.
- Driver:
- Switch from index-based to pointer-based device ID info lookup, storing
static references in driver_data. Centralize device ID handling in
device_id.rs, removing the open-coded ACPI/OF matching logic and duplicate
ID table from driver.rs.
- I/O:
- Make I/O regions typed (with a dynamically-sized Region type for the
existing untyped case), create view types representing subregions of a
mapped I/O region, and add io_project!() for safely creating subviews.
- Split Io into a base trait (IoBase) and an extension trait (Io) with a
blanket implementation, preventing implementers from overriding provided
methods that unsafe code relies on.
- Add a SysMem backend for shared system memory with volatile access, and
make Coherent implement Io via an I/O view type. Add IoSysMap as sum type
of Mmio and SysMem. Add copying methods (memcpy_{from,to}io()) and
read_val()/write_val() for typed access.
- Replace dma_read!()/dma_write!() with io_read!()/io_write!() for
primitives and copying methods for aggregates; drop the old macros.
Convert nova-core to use I/O projection.
- Fix internal shortcut rule dispatch in the register!() macro, remove
unused rule arguments, and use path fragments for alias destinations.
- IRQ:
- Make irq::Registration compatible with lifetime-bound drivers by
removing the 'static bound on Handler/ThreadedHandler and
replacing Devres<RegistrationInner> with direct
request_irq()/free_irq() calls. Handlers can now directly own
lifetime-bound device resources.
- PCI:
- Convert IrqVectorRegistration to a lifetime-annotated owning type,
giving drivers explicit control over the allocation lifetime.
IrqVector embeds a resolved IrqRequest, making the conversion
infallible. Remove the redundant
request_irq()/request_threaded_irq() wrappers from pci::Device.
- Add pci_irq_type() C helper and expose it via irq_type() on
IrqVectorRegistration and IrqVector, returning PCI_IRQ_MSIX, PCI_IRQ_MSI,
or PCI_IRQ_INTX.
- Mark pci::Device refcount methods inline.
- Serdev:
- Add Rust abstractions for the serial device bus, including serdev::Driver
trait, serdev::Device wrapping struct serdev_device, and serdev::Adapter
implementing RegistrationOps. Includes a sample driver. Markus Probst
takes over as serdev maintainer for both C and Rust code.
- Misc:
- Split ForLt into a base trait (providing the Of<'a> GAT) and an unsafe
CovariantForLt subtrait guaranteeing covariance, enabling invariant types
(e.g. those containing Mutex<&'bound T>) to participate in the ForLt
abstraction.
- Fix Coherent read past EOF returning -ERANGE instead of zero.
- Fix firmware example UB by avoiding null-pointer ARef.
- misc:
- Avoid iattr allocation in kernfs listxattr by using kernfs_iattrs_noalloc().
- Unregister SoC bus on early device registration failure.
- Remove unused DMA_FENCE_TRACE Kconfig symbol.
- Fix /sys/module path in comment.
- Refactor ISA bus init to remove nested blocks.
- Remove redundant nodemask clears in numa_init().
- Add kernel-doc for fwnode_operations and sys_soc.h, mark internal property
data as private for kernel-doc, and add property.h/fwnode.h to driver-api
infrastructure docs.
- Add MAINTAINERS entry for sys_soc.h.
-----BEGIN PGP SIGNATURE-----
iHUEABYKAB0WIQS2q/xV6QjXAdC7k+1FlHeO1qrKLgUCaoSPugAKCRBFlHeO1qrK
LlBrAP958EaYZVyfAsqq0EyHv86ahXKWoDDvkwbRUZA5CfV9tAD/bMWVtPLRYaaq
eNEZT7p5w3Haezh61H3c5zpuwFNMTA0=
=VRIa
-----END PGP SIGNATURE-----
Merge tag 'driver-core-7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core
Pull driver core updates from Danilo Krummrich:
"container_of:
- Apply typeof_member(), remove the local __mptr variable to
eliminate variable shadowing warnings on nested container_of()
calls, and remove unnecessary parentheses
core:
- Add driver name to probe debug print for initcall_debug
- Avoid repeatedly printing the same 'Fixed dependency cycle' log
- Unwind device_add() on attribute creation failure in
attribute_container_add_class_device()
- Remove statistics group if encryption group creation fails in
transport_add_class_device()
debugfs:
- Fix lockdown check for mmap_prepare()
- Warn if file creation failed due to uninitialized debugfs
device property:
- Implement fw_devlink support for software nodes by adding
software_node_add_links(), which creates fwnode links from
DEV_PROP_REF properties to enable automatic probe ordering. Add
kunit-managed fwnode helpers and test coverage
- Fix infinite loop in fwnode_for_each_child_node() when the
secondary fwnode has more than one child. Add test cases
- Fix out-of-bounds access in software_node_get_reference_args() when
called with index -1 (UINT_MAX)
- Refactor to use RAII approach with __free()
- Add Bartosz Golaszewski as software node reviewer
firmware loader:
- Fix race where a sysfs fallback request can complete before being
queued as pending, leading to a use-after-free on the next fallback
request
- Reject 0-size built-in firmware and fail the build on empty
firmware files in CONFIG_EXTRA_FIRMWARE
kobject:
- Provide __KOBJ_ATTR() and __KOBJ_ATTR_RO/WO() initialization macros
and allow the constification of kobject attributes, enabling them
to reside in read-only memory
platform:
- Provide platform_device_set_of_node(), platform_device_set_fwnode(),
and platform_device_set_of_node_from_dev() helpers that encapsulate
firmware node reference counting for dynamically allocated platform
devices
Convert all in-tree users that manually assigned dev.of_node or
dev.fwnode, fixing a pre-existing refcount bug in powermac. Switch
to counting references of all firmware node types, not only OF
nodes
- Unify the release path for dynamically allocated platform devices
by removing platform_device_release_full(). Amend the fwnode setter
API contract to warn if a primary software node is overwritten. Add
KUnit tests for correct software node removal on device
unregistration
Rust:
- Auxiliary:
- Add registration_data_with() closure-based API for invariant
ForLt types
- Debugfs:
- Migrate BinaryWriter and BinaryReaderMut trait requirements
from kernel::transmute traits to zerocopy traits
- Device:
- Add BoundInternal device context and InternalBoundContext trait
for bus abstractions that need internal access to a bound
device.
- Make the lifetime on Core and CoreInternal invariant to prevent
coercion to shorter lifetimes
- Devres:
- Fix race between concurrent revokers where the losing revoker
could return before the winning revoker finished dropping the
inner data, causing use-after-free.
- Ensure revocation is complete before the device finishes
unbinding by making the synchronization bidirectional.
- Add DevresLt<F: ForLt>, a wrapper around Devres that shortens
'static back to the caller's borrow scope. Implement ForLt and
CovariantForLt for Bar, IoMem, and ExclusiveIoMem
- Driver:
- Switch from index-based to pointer-based device ID info lookup,
storing static references in driver_data. Centralize device ID
handling in device_id.rs, removing the open-coded ACPI/OF
matching logic and duplicate ID table from driver.rs
- I/O:
- Make I/O regions typed (with a dynamically-sized Region type
for the existing untyped case), create view types representing
subregions of a mapped I/O region, and add io_project!() for
safely creating subviews.
- Split Io into a base trait (IoBase) and an extension trait (Io)
with a blanket implementation, preventing implementers from
overriding provided methods that unsafe code relies on.
- Add a SysMem backend for shared system memory with volatile
access, and make Coherent implement Io via an I/O view type.
Add IoSysMap as sum type of Mmio and SysMem. Add copying
methods (memcpy_{from,to}io()) and read_val()/write_val() for
typed access.
- Replace dma_read!()/dma_write!() with io_read!()/io_write!()
for primitives and copying methods for aggregates; drop the old
macros. Convert nova-core to use I/O projection.
- Fix internal shortcut rule dispatch in the register!() macro,
remove unused rule arguments, and use path fragments for alias
destinations
- IRQ:
- Make irq::Registration compatible with lifetime-bound drivers
by removing the 'static bound on Handler/ThreadedHandler and
replacing Devres<RegistrationInner> with direct
request_irq()/free_irq() calls. Handlers can now directly own
lifetime-bound device resources
- PCI:
- Convert IrqVectorRegistration to a lifetime-annotated owning
type, giving drivers explicit control over the allocation
lifetime. IrqVector embeds a resolved IrqRequest, making the
conversion infallible. Remove the redundant
request_irq()/request_threaded_irq() wrappers from pci::Device.
- Add pci_irq_type() C helper and expose it via irq_type() on
IrqVectorRegistration and IrqVector, returning PCI_IRQ_MSIX,
PCI_IRQ_MSI, or PCI_IRQ_INTX.
- Mark pci::Device refcount methods inline
- Serdev:
- Add Rust abstractions for the serial device bus, including
serdev::Driver trait, serdev::Device wrapping struct
serdev_device, and serdev::Adapter implementing
RegistrationOps. Includes a sample driver. Markus Probst takes
over as serdev maintainer for both C and Rust code
- Misc:
- Split ForLt into a base trait (providing the Of<'a> GAT) and an
unsafe CovariantForLt subtrait guaranteeing covariance,
enabling invariant types (e.g. those containing Mutex<&'bound T>)
to participate in the ForLt abstraction.
- Fix Coherent read past EOF returning -ERANGE instead of zero.
- Fix firmware example UB by avoiding null-pointer ARef
misc:
- Avoid iattr allocation in kernfs listxattr by using
kernfs_iattrs_noalloc().
- Unregister SoC bus on early device registration failure.
- Remove unused DMA_FENCE_TRACE Kconfig symbol.
- Fix /sys/module path in comment.
- Refactor ISA bus init to remove nested blocks.
- Remove redundant nodemask clears in numa_init().
- Add kernel-doc for fwnode_operations and sys_soc.h, mark
internal property data as private for kernel-doc, and add
property.h/fwnode.h to driver-api infrastructure docs.
- Add MAINTAINERS entry for sys_soc.h"
* tag 'driver-core-7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core: (129 commits)
rust: pci: expose the allocated interrupt type
PCI: Add pci_irq_type() to query the allocated interrupt type
rust: pci: remove request_irq() and request_threaded_irq() from Device
rust: pci: resolve IRQ in index() and embed IrqRequest in IrqVector
rust: pci: convert IrqVectorRegistration to a lifetime-managed owning type
kernfs: avoid iattr allocation in listxattr
rust: serdev: use ThisModule::as_ptr() instead of field access
ACPI/IORT: use platform_device_set_fwnode()
ACPI/APMT: use platform_device_set_fwnode()
firmware_loader: do not queue completed sysfs fallback requests
rust: pci: Mark Device refcount methods inline
rust: irq: make Registration compatible with lifetime-bound drivers
rust: net/phy: remove expansion from doc
rust: dma: return zero for Coherent reads past EOF
rust: io: register: use path fragment for alias destination
rust: io: register: remove unused rule arguments
rust: io: register: dispatch shortcut rules internally
MAINTAINERS: add sys_soc.h to DRIVER CORE
rust: debugfs: remove unsafe blocks from traits impl for Vec
rust: debugfs: migrate debugfs traits requirements to zerocopy
...
|
||
|
|
f4cdf7ca9a |
[GIT PULL for v7.3] media updates
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE+QmuaPwR3wnBdVwACF8+vY7k4RUFAmqFXqYACgkQCF8+vY7k 4RWNtw//T8GAlfl1BDlqxcWQHPFLkGqogsZQUx8aITayUBXpOzWHK4neGM7QF2Za 9kmBi3OzWgW3hIfbW4/vQCBSdDmTLSjoYHjYsc2Y3Cr0RvxIoEFw0GILYzygE3gp y9sUFHs2S43Xh1n3LuTcu0woL8YcY/3SaMrvEA6uoSGmOETiIUIuNkLpUAOEWhrl hkpRHt160yFiADSr8Ve9435xnkf5GvC0rmf/jF/KSUuNXrQuEx+5LIWzmadQRhph 2o+LuOJClKenglguU+yMA/DNEJuxxT1LOUgEiw05U2I03N8DqpiCO8Mpp2/l0iXH fgYFpObz6LdkusUSePamR2XaA3+ViNM48ddg1xmo+1gYQ/ggipsVVWifZpGFs2hq lbHEPV2Va/hlVj5EZJh4E6PHzH3UkGii2zgiHw0W3XWtTXS/qVlRjQwlo4aZTKok KPlOCNY69XADqOCmSB+kEmuCULfqoiJChk0qeRJX+kETc7gT+Qx4Ej0WT9LdF+NV 7+gxMOgUJFuTr1HkhO5ZXWezikBsJUvLUFud8mV+4iAJldby23I4UEXUEPK7od+W 8RXyWvf9/0owE2E3dOqkoM2sz2WW17nWZe8bPV+NTX39qw5WBOpaPpZGxVzOWinS KUTHJkp/O/1ymWtMz4+B+8QTO7n6KUnVDdL4qkO8cOrJGZizxoU= =8fcn -----END PGP SIGNATURE----- Merge tag 'media/v7.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - v4l2-core: added ISP statistics support and per-block validation - v4l2-core: Allow unknown HDR10 white point and luminance - New camera sensors: Sony IMX678 and IMX471m, Himax HM1092 IR sensor - New codec: Milos: VPU v2.0 codec support - isp driver: gained support for Dreamchip RPPX1 ISP framework - vsp1 driver: gained support for RZ/T2H and RZ/N2H - Novalake driver: gained CVS support for new NVL hardware - dvb-core: fix feed leak on failed DMX_ADD_PID - several driver fixes, cleanups and minor improvements * tag 'media/v7.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (308 commits) media: ipu-bridge: check all DMI entries when overriding sensor rotation media: v4l2-async: avoid deleting unlinked ASC entry on link error media: rzg2l-cru: Align bytesperline to hardware DMA stride requirement media: intel/ipu6: fix async notifier cleanup leak on parse error media: staging/ipu7: fix async notifier UAF on probe error path media: amd: isp4: fix self-deadlock in isp4sd_pwron_and_init() error path media: amd: isp4: release partial allocations in isp4if_alloc_fw_gpumem() media: rcar-isp: Fix VSPX reference leaks media: rcar-isp: Release ISPCORE resources media: i2c: imx415: Release runtime PM reference on VBLANK error media: i2c: imx415: Return test pattern write errors media: renesas: vsp1: Declare index variables in for loop statement media: renesas: vsp1: Make reset control optional to support platforms without a reset line media: dt-bindings: media: renesas,vsp1: Document RZ/T2H and RZ/N2H SoCs media: dt-bindings: media: renesas,fcp: Document RZ/T2H and RZ/N2H SoCs media: nxp: imx8-isi: Add additional 32-bit RGB format support media: nxp: imx8-isi: Add 16-bit raw Bayer format support media: nxp: imx8-isi: Implement per-stream reference counting for multiplexed streams media: nxp: imx8-isi: Use BIT_ULL() for 64-bit stream masks media: nxp: imx8-isi: Correct color map between V4L2 and ISI ... |
||
|
|
e5c91aac49 |
sound updates for 7.3-rc1
It was a fairly busy development cycle -- the changes spread over from
the core side to leaf drivers, with lots of cleanups and enhancements.
Here we go, some highlights:
* ALSA core:
- Extension of ALSA control component list ABI
- Locking optimization and RCU conversion of ALSA sequencer core
- A few hardening fixes for UMP and sequencer core
- Drop __bitwise and __force prefix from UAPI definitions
* ASoC:
- Automatic DAI format selection code deployment across many drivers
- Sorting of register default tables to prevent ordering issues in
many drivers
- Lots of code cleanups and refactoring
- Updates in Qualcomm driver stack
- New platforms: AMD ACP7.B/F, Cirrus Logic CS35L62, Loongson 2K0300,
Meson GX, Qualcomm LPI MI2S, SM8475, WSA855X, Realtek RT1321 VA1/2
and RT766/7
* HD-audio:
- Support for AW88399 HD-audio side codec for Lenovo Legion laptops
- Support for Hygon and Lisuan HDMI controllers
- Robustness fixes for wild device binding
- Lots of quirks/fixups: Realtek and Conexant codecs for ASUS, Lenovo,
Acer, etc
* USB-audio:
- Support for Pioneer DJ DJM-S11
- Scarlett2/FCP private URB notification fixes
- Extended quirk_flags to 64bit
- Hardening fixes for 6fire, bcd2000, usx2y
- Device-specific quirks for Mackie, Valeton, SPACETOUCH
* General:
- Auto-cleanup for put_device() and firmware loading across multiple
platforms
-----BEGIN PGP SIGNATURE-----
iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmqEXisOHHRpd2FpQHN1
c2UuZGUACgkQLtJE4w1nLE9H7g/7B1MuyObFnvkddyRlUP7tpXoHdMrRGP/1H9gD
f5eczeXovv4X4tkw/nsZcaWAH+9hQrswP/2CbK3ZxjkZomq8kc4llCZCt7pCfU52
FMLMRs+3/Rf0BLN+HJkjCRM1WPKaFcuo5ZFOCfkHrUTb0Wqs141Tl11891KGzUjg
jSuDr9dfrEJdSYHBDTlpn/2+pau8sNapHkiKrOqU/B9Ky49ngb+R6NjcphP6q1l4
bS8eoTsXi/XrKEK7eenq+0NX1FwYP1q8DXYSxE/zV2u6SAJDqmw4qEs1vziVUEtV
APVX+4HhMEFCHByvDIGc5HqsFsa05Uvwyfb90wQQcic7d9xuAbNK1NyrtNiDoPna
e/K6N3SddZSukXWNcTtbNGN1a7TMc0Y7cs+jOCqR6uw+SC3RdPF46LVmfpy5sFf+
PT3YCrWcArGrgvkt6frOUI3XEl00d7dns8J8uwsSWXwm7X/aSwC1Fy0v+JJSJPvR
taOOw2/zSXVR05G11YDdUcf9qDTkExM35j0AFrLViNj87m/U03oHRvQgAxGNgEPN
/q8lqt/R2XUULYNrR/4cWMrFGl32/+lmMO52a5uFIuqPgnG3S7WrjPqxibmZmgrl
k4hEPpU5jqstoByNHV4f8DbYBRwt906skgGGcVnku38XEaFilGZF4x5BkT7vvnxX
7o0MEfE=
=kp17
-----END PGP SIGNATURE-----
Merge tag 'sound-7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai:
"It was a fairly busy development cycle - the changes spread over from
the core side to leaf drivers, with lots of cleanups and enhancements.
Here we go, some highlights:
ALSA core:
- Extension of ALSA control component list ABI
- Locking optimization and RCU conversion of ALSA sequencer core
- A few hardening fixes for UMP and sequencer core
- Drop __bitwise and __force prefix from UAPI definitions
ASoC:
- Automatic DAI format selection code deployment across many drivers
- Sorting of register default tables to prevent ordering issues in
many drivers
- Lots of code cleanups and refactoring
- Updates in Qualcomm driver stack
- New platforms: AMD ACP7.B/F, Cirrus Logic CS35L62, Loongson
2K0300, Meson GX, Qualcomm LPI MI2S, SM8475, WSA855X, Realtek
RT1321 VA1/2 and RT766/7
HD-audio:
- Support for AW88399 HD-audio side codec for Lenovo Legion laptops
- Support for Hygon and Lisuan HDMI controllers
- Robustness fixes for wild device binding
- Lots of quirks/fixups: Realtek and Conexant codecs for ASUS,
Lenovo, Acer, etc
USB-audio:
- Support for Pioneer DJ DJM-S11
- Scarlett2/FCP private URB notification fixes
- Extended quirk_flags to 64bit
- Hardening fixes for 6fire, bcd2000, usx2y
- Device-specific quirks for Mackie, Valeton, SPACETOUCH
General:
- Auto-cleanup for put_device() and firmware loading across multiple
platforms"
* tag 'sound-7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (791 commits)
ALSA: hda: Fix connection list comparison in proc output
ALSA: docs: fix dead link to Intel HD-audio spec
ALSA: usb-audio: Add delay quirk for SPACETOUCH USB Audio
ALSA: hda: Add Lisuan HDMI controller and codec support
ALSA: hda/realtek: Fix Lenovo Yoga Slim 7 14AKP10 quirk ordering
ALSA: hda/tas2781: Add hardware stabilization delay during firmware load retries
ALSA: hda/realtek: Fix mute LED for HP Victus 15-fa1xxx (MB 8C3F)
ALSA: hda/realtek: Add micmute LED quirk for Acer Aspire A515-57
ASoC: tas2783-sdw: do not treat read-only Controls as writable
ASoC: SOF: validate topology volume range before allocation
ASoC: cs35l56: Use IRQ provided by the SoundWire core
soundwire: bus_type: Create IRQ mapping before calling driver probe()
ASoC: cs35l56: Move cs35l56_irq_request() after cs35l56_irq()
ASoC: cs35l56: Request IRQ in cs35l56_common_probe()
ALSA: core: Fix use-after-free in snd_card_do_free()
ALSA: hda/realtek: Drop duplicate quirk for Lenovo 0x17aa:0x38df
ALSA: usb-audio: Rename the Audient iD14 monitor mix volume control
ASoC: tas2781: Refactor calibration start kcontrol creation to separate helper
ASoC: dt-bindings: es8316: Fix supply property constraints
ALSA: seq: midi: Serialize input teardown with event_input
...
|
||
|
|
8dcef8882a |
x86/msr updates for v7.3:
- Streamline the x86 MSR handling APIs along the 64-bit
variants, simplifying the interfaces. Removal of the
old APIs is planned for the next cycle, to reduce
churn & integration pain. (Juergen Gross)
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-----BEGIN PGP SIGNATURE-----
iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmqC3qYRHG1pbmdvQGtl
cm5lbC5vcmcACgkQEnMQ0APhK1jSOA//cTRslNJ4t3g2cR8iPDFXsjMmwsvpDJn1
OVqOlyFcQpJCliC37JmRA94B6RufVdoFikOuyshn4SaPix8+lUKZDt+c5N6wfZsI
NJ4zuCHD4k0tDhHCYXihEISBAGUJrHk+6eiNTxDTlCUhCxqLvX1W1L0fiB4R2w0h
/Z1ZfL0Om6QV/V8u7lC8Vio0Uxp12Zjm60I43QBsUTOoD+4poaGGORV+03lnGnaZ
eaq9VRZKrrx6h3K5hS1Ja6j6mWehQzWabn3v5cM15IwYNuVA4g38OKR8ofqk0Shz
DvCILEtjoT7mXfvGoxYTSuEEa5aJoTSplMVbsrRuXHtcwDplnCGxCnYE0pYCfpFD
4xzvBBm15X20M0CFFW3lvJKqyN43M+Wfh/aOG0AT8BmIPKuyzZgc9yJ/QxmS4dYY
5atebSCK+caKr8IXshTTvssEWGF1A6un/0lOfuS2BmdIZuREYxzKWF3sqp3f10Gx
hSm1xB5HRhoQCIFP3PGER8bwwea0UmjI9VWHEkBKfNadqz3OPEZf4PQNiWJ3Q6x0
T7EGOWJlZTzCH2iqGrzPY0g56pPoDwGzjIruAmhc5NMFEOIHy0MKyPw4huWKSSzB
WVpqi8Gnn0HS3dECOnvkDpNM0JXDp9XYSaL5mLs/ZgWPIwJ6fFHbY34xm3A+Cjdp
hGYmT3Mtx1A=
=QBg3
-----END PGP SIGNATURE-----
Merge tag 'x86-msr-2026-08-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 MSR updates from Ingo Molnar:
- Streamline the x86 MSR handling APIs along the 64-bit variants,
simplifying the interfaces.
Removal of the old APIs is planned for the next cycle, to reduce
churn & integration pain (Juergen Gross)
* tag 'x86-msr-2026-08-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits)
x86/mce: Work around build warning after MSR-interface switch
cpufreq: Stop using 32-bit MSR interfaces
x86/featctl: Stop using 32-bit MSR interfaces
KVM/x86: Stop using 32-bit MSR interfaces
x86/mtrr: Stop using 32-bit MSR interfaces
acpi: Stop using 32-bit MSR interfaces
powercap: Stop using 32-bit MSR interfaces
thermal/intel: Stop using 32-bit MSR interfaces
x86/olpc: Stop using 32-bit MSR interfaces
x86/hyperv: Stop using 32-bit MSR interfaces
hwmon: Stop using 32-bit MSR interfaces
EDAC: Stop using 32-bit MSR interfaces
x86/cpu: Stop using 32-bit MSR interfaces
x86/apic: Stop using 32-bit MSR interfaces
x86/resctrl: Stop using 32-bit MSR interfaces
x86/tsc: Stop using 32-bit MSR interfaces
x86/amd: Stop using 32-bit MSR interfaces
x86/pci: Stop using 32-bit MSR interfaces
x86/hygon: Stop using 32-bit MSR interfaces
x86/mce: Stop using 32-bit MSR interfaces
...
|
||
|
|
85cdaca697 |
arm64 updates for 7.3
ACPI:
- Combine reads of AMU counters into a single FFH feedback counter op.
Confidential computing:
- Fix smp_processor_id() in preemptible context when retrieving an
attestation token inside a realm.
- Convert pKVM over to a "CC platform".
- Clean-up our SWIOTLB configuration in preparation for reworking the
handling of encrypted/decryped DMA buffers in the dma-mapping tree.
CPU errata handling:
- Work around broken device memory ordering on NVIDIA Olympus cores.
- Fix broken 'nospectre_bhb' command-line option.
- Select the idle loop backend instruction on the command-line.
CPU features:
- Replace our BBML2-noabort feature with the new architectural BBML3
feature.
- Disable in-kernel BTI for recent versions of Clang due to issues with
livepatch that are still being investigated.
- Clean-up documentation describing which ID register fields are exposed
to userspace.
Interrupts:
- Preliminary work towards supporting FEAT_NMI, which cleans up our
IRQ entry code and fixes some latent issues with pseudo-NMI.
- Support for an SDEI backend to trigger an NMI backtrace.
Memory management:
- Treat all devices as coherent when CLIDR_EL1.LoC == 0.
- Fix no-map handling of sub-page-sized regions.
- Second attempt at unmapping the linear aliases of the kernel data and
bss sections.
- Fix EFI runtime calls when software-PAN is enabled.
Miscellaneous:
- Add Mark Rutland as a reviewer!
- Tidy-up our futex cmpxchg logic when using the new LSUI instructions.
- Drop the requirement on DYNAMIC_FTRACE_WITH_CALL_OPS when selecting
HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS.
- Fix a false-positive KCSCAN splat in the delay loop.
- Use a portable typedef for 128-bit scalar types in our UAPI headers.
- Non-critical fixes for Sashiko reports all over.
MPAM:
- Hook MPAM memory bandwidth counters into resctrl's counter assignment
interface.
- Fix a quirk in the MPAM bandwidth counting on Nvidia T241 so that it
also applies to 63 bit counters.
Perf:
- Workarounds for hardware issues in the CMN-S3 PMU (Graviton 5) and CPU
PMU (NVIDIA Olympus again!)
- Add support for the DDR PMU on Marvell CN20K SoCs.
- Add support for Picoheart implementations of the DCW PCIe PMU.
- Add support for Channel/Rank/Bank filtering in the CXL PMU driver.
- Add support for 64-bit counters in the CSPMU device.
- Add support for revision 2 of the CMN S3 PMU.
Ptrace:
- Fix a decade-old bug in our handling of seccomp and tracing on syscall
entry.
- Fix regset handling for inactive SVE and SSVE registers.
Selftests
- Add some tests for the decade-old bug that we just tried to fix in our
syscall entry path.
- Fix SVE test crash on SME-only CPUs.
-----BEGIN PGP SIGNATURE-----
iQFEBAABCgAuFiEEPxTL6PPUbjXGY88ct6xw3ITBYzQFAmp+9HkQHHdpbGxAa2Vy
bmVsLm9yZwAKCRC3rHDchMFjNEjXB/4y8KueLwgMOcpjzJom6ujmE2Ab7IOI+I5v
rYQkGDdHLcQd0WW9gtFXoxlq/EUcWuVCGAdOF3PxkUmVhHJC45ZNSmBGS9/LbU3f
AqeFskSE46D2gOdMXSscwGAQ+OiQ6WlSSgqy2dU1ZfTXy7ioxydWVUtvmqMmB85O
ctN9Ocr3zAZuptuyLJurCJNnyCuzd55SIuy+WKU6NIpWseiIqiLEb/6HFbWcw6iV
vVZjD/Je5my8Gfjuu12z7kJ6o5jwGNpI8U7Z0b68ESUG3b5fh9E2zVLIq0fvn83B
rjPqg/Wj2TVGag/+yZgafLwQ/7111hhkdf1bPBitClx4GxOoZEjG
=Iypw
-----END PGP SIGNATURE-----
Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 updates from Will Deacon:
"There's a reasonable amount of stuff here, including a bunch of
updates to the perf PMU drivers and some MPAM updates to expose the
memory bandwidth counters via resctrl.
On the architecture side, some highlights include support for BBML3
and steps towards support for an architectural NMI solution, all
wrapped up in a web of fixes for latent issues identified by Sashiko.
ACPI:
- Combine reads of AMU counters into a single FFH feedback counter op
Confidential computing:
- Fix smp_processor_id() in preemptible context when retrieving an
attestation token inside a realm
- Convert pKVM over to a "CC platform"
- Clean-up our SWIOTLB configuration in preparation for reworking the
handling of encrypted/decryped DMA buffers in the dma-mapping tree
CPU errata handling:
- Work around broken device memory ordering on NVIDIA Olympus cores
- Fix broken 'nospectre_bhb' command-line option
- Select the idle loop backend instruction on the command-line
CPU features:
- Replace our BBML2-noabort feature with the new architectural BBML3
feature
- Disable in-kernel BTI for recent versions of Clang due to issues
with livepatch that are still being investigated
- Clean-up documentation describing which ID register fields are
exposed to userspace
Interrupts:
- Preliminary work towards supporting FEAT_NMI, which cleans up our
IRQ entry code and fixes some latent issues with pseudo-NMI
- Support for an SDEI backend to trigger an NMI backtrace
Memory management:
- Treat all devices as coherent when CLIDR_EL1.LoC == 0
- Fix no-map handling of sub-page-sized regions
- Second attempt at unmapping the linear aliases of the kernel data
and bss sections
- Fix EFI runtime calls when software-PAN is enabled
Miscellaneous:
- Add Mark Rutland as a reviewer!
- Tidy-up our futex cmpxchg logic when using the new LSUI
instructions
- Drop the requirement on DYNAMIC_FTRACE_WITH_CALL_OPS when
selecting HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
- Fix a false-positive KCSCAN splat in the delay loop
- Use a portable typedef for 128-bit scalar types in our UAPI headers
- Non-critical fixes for Sashiko reports all over
MPAM:
- Hook MPAM memory bandwidth counters into resctrl's counter
assignment interface
- Fix a quirk in the MPAM bandwidth counting on Nvidia T241 so that
it also applies to 63 bit counters
Perf:
- Workarounds for hardware issues in the CMN-S3 PMU (Graviton 5) and
CPU PMU (NVIDIA Olympus again!)
- Add support for the DDR PMU on Marvell CN20K SoCs
- Add support for Picoheart implementations of the DCW PCIe PMU
- Add support for Channel/Rank/Bank filtering in the CXL PMU driver
- Add support for 64-bit counters in the CSPMU device
- Add support for revision 2 of the CMN S3 PMU
Ptrace:
- Fix a decade-old bug in our handling of seccomp and tracing on
syscall entry
- Fix regset handling for inactive SVE and SSVE registers
Selftests
- Add some tests for the decade-old bug that we just tried to fix in
our syscall entry path
- Fix SVE test crash on SME-only CPUs"
* tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (95 commits)
arm64/efi: Avoid voluntary preemption with efi_mm installed
arm64: bti: Disable in-kernel BTI with recent versions of Clang
arm64: entry: Avoid unnecessary local_irq_disable() on kernel exit
irqchip/gic-v3: make the unmasking of pseudo-NMIs explicit when handling IRQs
arm64: Disable KCSAN instrumentation in delay.o
arm_mpam: Disable driver unbind to avoid UAF
arm_mpam: Fix a NULL pointer dereference on unbinding after an error interrupt
perf: arm_pmuv3: Zero initialize hw_id branch stack field
arm64: mm: Unmap kernel data/bss entirely from the linear map
iommu/arm-smmu-v3-sva: Use system_supports_bbml3() to detect CPU feature
perf/arm-cmn: Support CMN S3 r2
perf/arm-cmn: Plumb in new filter types
perf/arm-cmn: Refactor event filter data
perf/arm-cmn: Refactor event filter programming
perf/arm-cmn: Rename filter variables for clarity
arm64: mm: fix accidental linear mapping of no-map reserved memory
tools: Ensure tools copy of linux/filter.h exports the UAPI
kselftest/arm64: Fix abi test compilation errors
arch: arm64: add early_param idle=<wfi|yield|nop>
arm64: entry: mask DAIF before returning from C EL1 handlers
...
|
||
|
|
a5778046a0 |
Power management updates for 7.3-rc1
- Minor fixes and cleanups in assorted cpufreq drivers (Dan Carpenter,
Guru Das Srinagesh, Haoxiang Li, Karl Mehltretter, Sasha Finkelstein,
and Pan Chuang)
- Fix cpufreq table creation and bios_limits() callback in the Rust
bindings (Priya Bala Govindasamy)
- Add IPQ5210 support to qcom-nvmem driver (Varadarajan Narayanan)
- Adjust the .adjust_perf() cpufreq driver callback to allow the
maximum performance value to be passed to drivers and update the
intel_pstate driver to use it (Rafael Wysocki)
- Set policy->cur to the actual requested frequency in the intel_pstate
driver when the performance policy is used (Rafael Wysocki)
- Simplify HWP handling on Broadwell processors in intel_pstate (Rafael
Wysocki)
- Fix setting minimum P-state at init time in intel_pstate (Rafael
Wysocki)
- Consolidate frequency values computation in intel_pstate and clean up
code in that driver (Rafael Wysocki)
- Add missing kernel-doc descriptions for structure and union members
in the amd-pstate driver (David Vernet)
- Handle missing policy in dynamic EPP callbacks in the amd-pstate
driver (EDAMAMEX)
- Introduce EXPORT_SYMBOL_FOR_PSTATE_UT() to export amd-pstate driver
symbols to the amd-pstate-ut subdriver (K Prateek Nayak)
- Add dynamic EPP as an "energy_performance_preference" mode in
amd-pstate, remove the "amd_dynamic_epp" kernel command line option
and the "dynamic_epp" sysfs attribute, and update the dynamic_epp
documentation accordingly (K Prateek Nayak)
- Add unit tests for CPPC Performance Priority and the "dynamic" EPP
mode in the amd-pstate driver (K Prateek Nayak)
- Set min_limit_freq based on bios_min_perf in amd-pstate and remove
the defensive check for bios_min_perf from it (K Prateek Nayak)
- Fix EPP return type and handle errors in amd-pstate during
initialization, toggle auto_sel in active mode on shared memory
systems, and cache the firmware programmed EPP value (Marco Scardovi)
- Skip tests in amd-pstate-ut if the amd-pstate driver is not in active
use (Qianheng Peng)
- Replace sprintf() with sysfs_emit() in sysfs show in the cpufreq
schedutil governor and fix a self-contradictory comment in
sugov_iowait_apply() (Zhongqiu Han)
- Fix the usage example for the sampling_rate tunable of the ondemand
cpufreq governor in admin-guide (wangxiaodong)
- Avoid using deep idle states during initialization in the intel_idle
driver to work around device handling issues (Rafael Wysocki)
- Fix and refactor the ACPI processor driver code related to ACPI _LPI
support and add ACPI _LPI support to intel_idle based on that ACPI
processor driver update (Rafael Wysocki)
- Backup and restore governor for cpufreq sptests (Yiwei Lin)
- Remove unnecessary sudo from quick_shuffle() and remove unused local
variables from switch_show_governor() in cpufreq selftests (Jinseok
Kim)
- Rename the PM core module parameter prefix to "pm" and allow the PM
transition (DPM) watchdog to be disabled by default (Tzung-Bi Shih)
- Fix off-by-one in wakelocks number limit check in the system sleep
sysfs interface (Haowen Tu)
- Remove kernel-doc markings from helper descriptions in the core
hibernation code (Adi Nata)
- Use %pe to print error pointer values in the hibernation core (Ronan
Marchal)
- Fix memory leak in snapshot_write_next() error path (Malaya Kumar
Rout)
- Delay allocating and linking the next swap_map_page in the
hibernation image saving code until another image page actually
needs to be recorded (Haesung Kim)
- Fix cleanup ordering around scope-based pointers in OPP (Gregor
Herburger).
- Use clk_get_optional() for optional clocks in OPP (Praveen Talari).
- Stop setting runtime_error on runtime resume callback failures to
allow drivers to recover from resume issues (Praveen Talari)
- Handle PMU registration failure during probe in the intel_rapl_tpmi
driver (Sumeet Pawnikar)
- Avoid optional imports in intel_pstate_tracer unless they are really
needed (Yousef Alhouseen)
- Add generic CPPC performance display to the cpupower utility, build
and call CPPC information on non-AMD processors, make cpupower print
kernel and hardware frequency information, and add libm to cpupower
for generic CPPC view (Jeremy Linton)
- Remove conditional return with no effect from cpupower (Sang-Heon
Jeon)
-----BEGIN PGP SIGNATURE-----
iQFGBAABCAAwFiEEcM8Aw/RY0dgsiRUR7l+9nS/U47UFAmp+DXsSHHJqd0Byand5
c29ja2kubmV0AAoJEO5fvZ0v1OO10Z4IAIYwM9RKwbwCqPMKGvWExIb+1kpEy1aw
wyFnYSiQd09XCt8/YjERFR9gB7CfGduisTxEOqOdCIpGX2rT9Me5xO5aR5Gz4FE3
bML7KyulS9tVyaEVBjFx1yDZxGTNooTQVTLIxBYbCVB1RrgiCGdLyC2okn79XHlk
olTZemq59Kn0B6t7BP7UQ0WCCCAs3RlbrQIZSrVh0HydoO0DHlJvttN2fc7bjeiM
Je/dSm14o+vjglkVpY1kbxzBHJOH7/XH5nqSQRoHoAZWdllWK4+iQtll63Un4A72
2KG0O5+nFrS3d166TEjDEInnEwR012Sod/8Gk72M0IZZhG/naqs5ekE=
=mn7E
-----END PGP SIGNATURE-----
Merge tag 'pm-7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management updates from Rafael Wysocki:
"As has been the case for quite some time, this set of changes is
dominated by cpufreq updates including intel-pstate and amd-pstate
driver updates, minor fixes and cleanups of other assorted cpufreq
drivers, schedutil governor updates, fixes of the Rust bindings, new
hardware support (IPQ5210 in qcom-nvmem), and some updates of self
tests related to cpufreq.
The second largest group of changes are cpuidle updates consisting of
intel_idle driver updates and ACPI processor idle driver updates, both
mostly related to ACPI _LPI support.
There are also updates related to system sleep, mostly in the
hibernation core code, two operating performance points (OPP) updates,
one runtime PM framework update, one power capping update, and some
tools updates including the addition of ACPI CPPC support to cpupower.
Specifics:
- Minor fixes and cleanups in assorted cpufreq drivers (Dan
Carpenter, Guru Das Srinagesh, Haoxiang Li, Karl Mehltretter, Sasha
Finkelstein, and Pan Chuang)
- Fix cpufreq table creation and bios_limits() callback in the Rust
bindings (Priya Bala Govindasamy)
- Add IPQ5210 support to qcom-nvmem driver (Varadarajan Narayanan)
- Adjust the .adjust_perf() cpufreq driver callback to allow the
maximum performance value to be passed to drivers and update the
intel_pstate driver to use it (Rafael Wysocki)
- Set policy->cur to the actual requested frequency in the
intel_pstate driver when the performance policy is used (Rafael
Wysocki)
- Simplify HWP handling on Broadwell processors in intel_pstate
(Rafael Wysocki)
- Fix setting minimum P-state at init time in intel_pstate (Rafael
Wysocki)
- Consolidate frequency values computation in intel_pstate and clean
up code in that driver (Rafael Wysocki)
- Add missing kernel-doc descriptions for structure and union members
in the amd-pstate driver (David Vernet)
- Handle missing policy in dynamic EPP callbacks in the amd-pstate
driver (EDAMAMEX)
- Introduce EXPORT_SYMBOL_FOR_PSTATE_UT() to export amd-pstate driver
symbols to the amd-pstate-ut subdriver (K Prateek Nayak)
- Add dynamic EPP as an "energy_performance_preference" mode in
amd-pstate, remove the "amd_dynamic_epp" kernel command line option
and the "dynamic_epp" sysfs attribute, and update the dynamic_epp
documentation accordingly (K Prateek Nayak)
- Add unit tests for CPPC Performance Priority and the "dynamic" EPP
mode in the amd-pstate driver (K Prateek Nayak)
- Set min_limit_freq based on bios_min_perf in amd-pstate and remove
the defensive check for bios_min_perf from it (K Prateek Nayak)
- Fix EPP return type and handle errors in amd-pstate during
initialization, toggle auto_sel in active mode on shared memory
systems, and cache the firmware programmed EPP value (Marco
Scardovi)
- Skip tests in amd-pstate-ut if the amd-pstate driver is not in
active use (Qianheng Peng)
- Replace sprintf() with sysfs_emit() in sysfs show in the cpufreq
schedutil governor and fix a self-contradictory comment in
sugov_iowait_apply() (Zhongqiu Han)
- Fix the usage example for the sampling_rate tunable of the ondemand
cpufreq governor in admin-guide (wangxiaodong)
- Avoid using deep idle states during initialization in the
intel_idle driver to work around device handling issues (Rafael
Wysocki)
- Fix and refactor the ACPI processor driver code related to ACPI
_LPI support and add ACPI _LPI support to intel_idle based on that
ACPI processor driver update (Rafael Wysocki)
- Backup and restore governor for cpufreq sptests (Yiwei Lin)
- Remove unnecessary sudo from quick_shuffle() and remove unused
local variables from switch_show_governor() in cpufreq selftests
(Jinseok Kim)
- Rename the PM core module parameter prefix to "pm" and allow the PM
transition (DPM) watchdog to be disabled by default (Tzung-Bi Shih)
- Fix off-by-one in wakelocks number limit check in the system sleep
sysfs interface (Haowen Tu)
- Remove kernel-doc markings from helper descriptions in the core
hibernation code (Adi Nata)
- Use %pe to print error pointer values in the hibernation core
(Ronan Marchal)
- Fix memory leak in snapshot_write_next() error path (Malaya Kumar
Rout)
- Delay allocating and linking the next swap_map_page in the
hibernation image saving code until another image page actually
needs to be recorded (Haesung Kim)
- Fix cleanup ordering around scope-based pointers in OPP (Gregor
Herburger).
- Use clk_get_optional() for optional clocks in OPP (Praveen Talari).
- Stop setting runtime_error on runtime resume callback failures to
allow drivers to recover from resume issues (Praveen Talari)
- Handle PMU registration failure during probe in the intel_rapl_tpmi
driver (Sumeet Pawnikar)
- Avoid optional imports in intel_pstate_tracer unless they are
really needed (Yousef Alhouseen)
- Add generic CPPC performance display to the cpupower utility, build
and call CPPC information on non-AMD processors, make cpupower
print kernel and hardware frequency information, and add libm to
cpupower for generic CPPC view (Jeremy Linton)
- Remove conditional return with no effect from cpupower (Sang-Heon
Jeon)"
* tag 'pm-7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (76 commits)
cpufreq: imx6q: fix out-of-bounds write when probed more than once
cpufreq: imx6q: fix devres accumulation across driver rebind
rust: cpufreq: Fix temporary write in Registration::bios_limit_callback
rust: cpufreq: Add CPUFREQ_TABLE_END as last table entry in TableBuilder::to_table
opp: Use clk_get_optional() to avoid leaving opp_table->clk as an error pointer
intel_idle: Avoid using deep idle states during initialization
cpupower: remove conditional return with no effect
cpufreq: intel_pstate: Adjust policy->cur in active mode to policy
cpufreq/amd-pstate: Document missing kernel-doc members
cpufreq/amd-pstate-ut: Add unit test for CPPC Performance Priority
cpufreq/amd-pstate-ut: Add unit test for "dynamic" EPP mode
cpufreq/amd-pstate: Reduce the scope of exported symbols
Documentation/amd-pstate: Update dynamic_epp documentation with new behavior
cpufreq/amd-pstate: Remove "amd_dynamic_epp" cmdline and "dynamic_epp" sysfs
cpufreq/amd-pstate: Add dynamic EPP as an "energy_performance_preference" mode
cpufreq/amd-pstate: Extract platform profile to EPP conversion into a helper
cpufreq/amd-pstate: Remove the defensive check for bios_min_perf
cpufreq/amd-pstate: Set min_limit_freq based on bios_min_perf
powercap: intel_rapl_tpmi: Handle PMU registration failure during probe
PM: sleep: Allow disabling DPM watchdog by default
...
|
||
|
|
692719a9d4 | Merge branch 'for-next' into for-linus | ||
|
|
6d2d462748 |
ACPI: APD: Add clock frequency for HJMC01 I2C controller
I2C clock frequency for HJMC01 is 200MHz, define a new ACPI HID for it. Signed-off-by: Xiangyang Yu <hunter.yu@hj-micro.com> Signed-off-by: Hongnan Li <clarke.li@hj-micro.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260813064025.45242-1-clarke.li@hj-micro.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> |
||
|
|
4226911d72 |
ACPI: APD: Convert fixed clock rates to use HZ_PER_MHZ
Use HZ_PER_MHZ multiplier for fixed_clk_rate values to improve readability. Signed-off-by: Hongnan Li <clarke.li@hj-micro.com> Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260813063005.42925-1-clarke.li@hj-micro.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> |
||
|
|
87ee7d704f |
ACPI: scan: Use acpi_bus_get_primary_device()
The acpi_get_first_physical_node() usage in acpi_create_video_bus_device()
is generally unsafe because in theory the device returned by it may be
freed at any time.
Address this issues by using acpi_bus_get_primary_device() instead of
acpi_get_first_physical_node() and dropping the device reference
acquired by it after registering the child.
Fixes:
|
||
|
|
a9ba4dd2f1 |
ACPI: platform: Use acpi_bus_get_primary_device()
The acpi_get_first_physical_node() usage in acpi_platform_fill_resource() and acpi_create_platform_device() is generally unsafe because in theory the device returned by it may be freed at any time [1]. It is also inefficient because acpi_get_first_physical_node() is called multiple times for the same argument which can be avoided. Address these issues by using acpi_bus_get_primary_device() instead of acpi_get_first_physical_node() and adjusting the code to call it just once at the beginning of and acpi_create_platform_device() and drop the device reference acquired by it upon the return from that function. Fixes: |
||
|
|
72530e1f72 |
ACPI: bus: Introduce acpi_bus_get_primary_device()
The function used for obtaining the first "physical" device for which the given ACPI one is the ACPI companion, acpi_get_first_physical_node(), may return a stale device pointer (mostly in theory) because acpi_unbind_one() may run as a whole after dropping the ACPI device's physical_node_lock in acpi_get_first_physical_node() and before it returns. The last reference to the "physical" device may be dropped then before the pointer to it is returned to the caller. If that happens and the acpi_get_first_physical_node() caller invokes get_device() on the pointer obtained from it, which is done by the majority of its callers, a use-after-free will occur. To prepare for addressing this problem, introduce a new function for getting the first "physical" device associated with the given ACPI one (the "primary physical device") that will also reference count the device in question before returning a pointer to it. Make that new function and acpi_get_first_physical_node() share the physical node list lookup code. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/2843318.mvXUDI8C0e@rafael.j.wysocki |
||
|
|
fba08739e9 | Merge back ACPI bus type changes for 7.3 | ||
|
|
a414485ebc |
ACPI: scan: fix bus ID cleanup on device_add() failures
When device_add() fails after acpi_device_set_name() has allocated an
instance ID and a new acpi_device_bus_id has been linked into
acpi_bus_id_list, the rollback path only removes wakeup_list and
detaches the ACPI handle data.
That leaves the bus-ID bookkeeping behind and keeps the allocated
instance number consumed.
Move the bus-ID cleanup and wakeup-list removal into a single helper.
Use it from both the normal device teardown path and the device_add()
rollback path. The wakeup list node is initialized before registration,
so it can be deleted without checking whether the device is wakeup-
capable like in the original teardown path.
Fixes:
|
||
|
|
9e409f1dff |
ACPI: battery: Protect all properties with a separated mutex
The acpi_battery_get_property() callback calls acpi_battery_get_state()
without any lock held. On some devices, it happens that the property
cache has expired before a uevent reaches userspace, triggering
simultaneous attempts to evaluate _BST. See [1] for an analysis to sysrq
stacktraces on one of the these devices.
In a few cases, including when the AML is sleeping or acquiring a mutex,
ACPICA drops the namespace and interpreter locks and allows the
evaluation of _BST to start while another task is still evaluating it.
This could somehow confuse the interpreter and lead to chaos in AML
mutexes on some devices, see [2] for an example.
Not holding the lock is also prone to race conditions, for example:
CPU0 | CPU1
acpi_battery_get_property() |
acpi_battery_get_state() |
[update_time expired] |
extract_package() | acpi_battery_get_property()
battery->update_time = jiffies | acpi_battery_get_state()
kfree() | [up to date]
| [read capacity_now]
[fix capacity_now due to quirk] |
where CPU1 gets raw capacity_now before CPU0 fixes it to a meaningful
value.
The existing mutex update_lock is not applicapable for
acpi_battery_get_property(), as some code path could call or wait for
acpi_battery_get_property() while holding update_lock.
Therefore, introduce a mutex called property_lock to protect all
accesses to battery properties, so that acpi_battery_get_property() can
take the advantage of the mutex and synchronize itself. With the mutex,
acpi_battery_get_state() are synchronized in all code paths calling it,
and its cache mechanism can always clamp the frequency of _BST
evaluations according to cache_time.
The helper function acpi_battery_handle_discharging() for quirky devices
has to be inlined due to the change, as the mutex must be unlocked
before calling the expensive power_supply_is_system_supplied() helper
function.
Fixes:
|
||
|
|
de5e5f9b99 |
Merge branch 'for-next/perf' into for-next/core
* for-next/perf: (27 commits) perf: arm_pmuv3: Zero initialize hw_id branch stack field perf/arm-cmn: Support CMN S3 r2 perf/arm-cmn: Plumb in new filter types perf/arm-cmn: Refactor event filter data perf/arm-cmn: Refactor event filter programming perf/arm-cmn: Rename filter variables for clarity perf/arm_cspmu: Support 64-bit programmers' model drivers/perf: hisi: Remove redundant dev_err()/dev_err_probe() perf: arm_cspmu: Remove redundant dev_err() perf: Remove redundant dev_err()/dev_err_probe() perf: arm_pmu_acpi: Get rid of the edge-triggered interrupt oddity perf/arm_cspmu: Make IRQ more optional perf/arm_cspmu: Improve sub-module error reporting perf/arm_cspmu: Improve APMT-based PMU naming ACPI/APMT: Use stable device ID perf/cxlpmu: Support Channel/Rank/Bank filter perf/cxlpmu: Add missing CXL 4.0 events perf/cxlpmu: Fix 64-bit write to 32-bit HDM filter register perf/dwc_pcie: Support narrowed time-based counter for long time monitoring perf/dwc_pcie: Add support for Picoheart vendor devices ... |
||
|
|
79ba234b39 |
Merge branch 'acpi-video'
Merge updates related to the ACPI video bus driver for 7.3-rc1: - Introduce helper function acpi_dev_is_video_device() and use it in the core ACPI device enumeration code, in the ACPI video bus driver, in the ACPI support code for I2C, in the PCI VGA driver, and in the x86 platform thinkpad_acpi driver (Andy Shevchenko) - Add a quirk to use the native backlight on Acer Nitro AN515-46 to the ACPI video bus driver (Marcos Paulo Medeiros) - Release PCI device reference after lookup in video_detect_portege_r100() in the ACPI video bus driver (Yuho Choi) * acpi-video: ACPI: video: Release PCI device reference after lookup ACPI: video: force native backlight on Acer Nitro AN515-46 platform/x86: thinkpad_acpi: Convert to use acpi_dev_is_video_device() helper PCI/VGA: Convert to use acpi_dev_is_video_device() helper i2c: acpi: Convert to use acpi_dev_is_video_device() helper ACPI: video: Convert to use acpi_dev_is_video_device() helper ACPI: scan: Convert to use acpi_dev_is_video_device() helper ACPI: utils: Introduce acpi_dev_is_video_device() helper |
||
|
|
79a0aabd5d |
Merge branches 'acpi-scan', 'acpi-pci', 'acpi-tad' and 'acpi-apei'
Merge an ACPI device enumeration core code update, ACPI support updates related to PCI, an ACPI Time and Alarm Device (TAD) driver update and ACPI APEI updates for 7.3-rc1: - Avoid registering platform devices with resource overlaps in the ACPI core device enumeration code (Rafael Wysocki) - Clear driver_data on all paths that free acpi_pci_root in acpi_pci_root_add() (Chen Pei) - Simplify acpi_get_pci_dev() with the help of a mutex guard, introduce acpi_dev_get_pci_dev() for code that has a struct ACPI device for which it wants to get the struct pci_dev pointer of the associated PCI device, and use it in the ACPI video bus driver (Rafael Wysocki) - Avoid printing confusing _OSC messages for non-PCIe host bridges without _OSC which is a valid configuration (Kazuma Kondo) - Add locking around evaluation of ACPI control methods in the ACPI TAD driver to avoid race conditions (Rafael Wysocki) - Handle repeated SEA error storms in APEI (Junhao He) - Fix ERST timeout unit conversion in APEI (Nirmoy Das) - Fix ARM section length accounting after header in the ACPI APEI GHES driver (TanZheng) - Mark ghes_in_nmi_spool_from_list() as maybe unused (Rui Qi) * acpi-scan: ACPI: scan: Avoid registering platform devices with resource overlaps * acpi-pci: ACPI: PCI: Avoid misleading _OSC messages for non-PCIe host bridges without _OSC ACPI: video: Use acpi_dev_get_pci_dev() instead of acpi_get_pci_dev() ACPI: video: Drop backlight parent device reference later ACPI: PCI: Introduce acpi_dev_get_pci_dev() ACPI: PCI: Use a mutex guard to simplify acpi_get_pci_dev() ACPI: PCI: Clear driver_data on all paths that free the acpi_pci_root * acpi-tad: ACPI: TAD: Add locking around AML evaluations * acpi-apei: ACPI: APEI: Handle repeated SEA error storms ACPI: APEI: Fix ERST timeout unit conversion ACPI: APEI: GHES: fix ARM section length accounting after header ACPI: APEI: GHES: Mark ghes_in_nmi_spool_from_list() as maybe unused |
||
|
|
f234fdaae1 |
ACPI: scan: Avoid registering platform devices with resource overlaps
If acpi_dev_get_resources() returns overlapping I/O or memory resources, the subsequent registration of a platform device will fail with -EBUSY due to a resource conflict. This is reported to happen on Acer Aspire ES1-572 [1]. Avoid that by adjusting resources returned by acpi_dev_get_resources() to eliminate partial overlaps between them. This has not been regarded as necessary before because putting overlapping resources into the _CRS of one device is really pointless, but now that the issue has been reported to actually happen in the field, it needs to be done. Fixes: |
||
|
|
dbaafe9cc5 |
Linux 7.2-rc7
-----BEGIN PGP SIGNATURE----- iQFSBAABCgA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmp49yoeHHRvcnZhbGRz QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiG1WIH/1SD1rNIb4Prf0C7 Rk9Hz0IZ3uYNe1Xi+Ozv3zQUuLB6d7ewl9e4zyHHYT4eeIKvBZv9jtIF3QH4ty5X JB9Gy62WICtqIEkzzt2bkcV1byFmKz2+BLv04fgcyTXEGOEByCDiZ3/N3kSJOqvg YxsGOmKkQSTavFLSe96Gj2pgchJqZ6j3qucDO6GrPOo8depP2kfzxfaJbXix0HEZ ln08X9hgZDxy4I98PmSaaJsK2R/i6T6jQdA3i8DnSbbyNhLn+3FK6gkP08ZEpaor 82WwJf+MVCLHXLYDy0aYOUDHpkNkkJWOj45A2Hv9JkOupGcUpyPGr82l4yh/MrxC +kM28xs= =rIbd -----END PGP SIGNATURE----- Merge tag 'v7.2-rc7' into driver-core-next We need the driver-core fixes in here as well to build on top of. Signed-off-by: Danilo Krummrich <dakr@kernel.org> |
||
|
|
d3436d3334 |
ACPI: tables: Add missing #include <asm/fixmap.h>
drivers/acpi/tables.c uses NR_FIX_BTMAPS without including <asm/fixmap.h>. This isn't a problem for existing archs, but would be when ARCH_HAS_ACPI_TABLE_UPGRADE is enabled for RISC-V. Add the missing include. Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn> Link: https://patch.msgid.link/20260616-riscv-acpi-table-upgrade-v1-1-45902d2dedf9@iscas.ac.cn Signed-off-by: Paul Walmsley <pjw@kernel.org> |
||
|
|
67b1e7245b |
ACPI/IORT: use platform_device_set_fwnode()
Platform devices using the split approach of calling platform_device_alloc() and platform_device_add() must not assign the firmware nodes manually but use the provided platform_device_set_fwnode() function which additionally makes sure we track the reference count of the firmware node correctly. Replace the manual assignment of the firmware node with a call to platform_device_set_fwnode(). Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Acked-by: Sudeep Holla <sudeep.holla@kernel.org> Link: https://patch.msgid.link/20260728-acpi-arm64-pdev-set-fwnode-v1-2-b5aff9b2235a@oss.qualcomm.com Signed-off-by: Danilo Krummrich <dakr@kernel.org> |
||
|
|
5ab289f5ea |
ACPI/APMT: use platform_device_set_fwnode()
Platform devices using the split approach of calling platform_device_alloc() and platform_device_add() must not assign the firmware nodes manually but use the provided platform_device_set_fwnode() function which additionally makes sure we track the reference count of the firmware node correctly. Replace the manual assignment of the firmware node with a call to platform_device_set_fwnode(). Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Acked-by: Sudeep Holla <sudeep.holla@kernel.org> Link: https://patch.msgid.link/20260728-acpi-arm64-pdev-set-fwnode-v1-1-b5aff9b2235a@oss.qualcomm.com Signed-off-by: Danilo Krummrich <dakr@kernel.org> |
||
|
|
9946623dd4 |
Merge branch 'intel-idle-lpi'
Merge an ACPI processor driver update related to ACPI _LPI support and the introduction of ACPI _LPI suppor to intel_idle based on that update for 7.3-rc1. * intel-idle-lpi: intel_idle: Update documentation after adding ACPI _LPI support intel_idle: Add ACPI _LPI support intel_idle: Prepare for adding ACPI _LPI support ACPI: processor: idle: Add switch for strict _LPI processing ACPI: processor: idle: Relocate acpi_processor_extract_lpi_info() ACPI: processor: idle: Introduce acpi_processor_extract_lpi_info() ACPI: processor: idle: Introduce too_many_states() for _LPI ACPI: processor: idle: Rework flatten_lpi_states() ACPI: processor: idle: Rearrange loop in acpi_processor_get_lpi_info() ACPI: processor: idle: Drop redundant _LPI presence checks ACPI: processor: idle: Rework first-level _LPI states processing ACPI: processor: idle: Rearrange acpi_processor_get_lpi_info() ACPI: processor: idle: Introduce lpi_state_debug() ACPI: processor: idle: Split acpi_processor_evaluate_lpi() ACPI: processor: idle: Rearrange acpi_processor_evaluate_lpi() ACPI: processor: idle: Unify debug in acpi_processor_evaluate_lpi() ACPI: processor: idle: Ignore _LPI states with SYSTEMIO entry method ACPI: processor: idle: Expand _LPI package sanity checks |
||
|
|
02859a576a |
Merge branch 'acpi-irqchip'
Merge irqchip changes related to ACPI support that are needed to enable GICv5 IWB ACPI probe ordering detection on ARM, including the addition of acpi_device_clear_deps() and RISC-V interrupt controller management code refactoring to extract generic code from it into the common ACPI IRQ code (Lorenzo Pieralisi) * acpi-irqchip: irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection ACPI/IORT: Implement ACPI infrastructure to enable GICv5 IWB probe deferral ACPI: irq: Move RISC-V interrupt controllers autodep to ACPI IRQ code ACPI: RISC-V: Fix riscv_acpi_add_prt_dep() loop handling ACPI: RISC-V: Check acpi_get_handle() status in riscv_acpi_add_prt_dep() ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination ACPI: Add acpi_device_clear_deps() helper function |
||
|
|
9341ba2743 |
Merge branches 'acpi-numa', 'acpi-misc' and 'pnp'
Merge and ACPI support update related to NUMA, miscellaneous updates related to ACPI support, and PNP updates for 7.3-rc1: - Remove a node_set() call that is redundant from acpi_parse_memory_affinity() (Sang-Heon Jeon) - Prevent kernel-doc warnings by converting 2 function description comments to kernel-doc format (Randy Dunlap) - Fix docs build error in the ACPI admin-guide documentation (Randy Dunlap) - Replace __get_free_page() with kmalloc() in the code handling ACPI NVS memory during system suspend/resume (Mike Rapoport) - Fix card device cleanup on registration failure in the core PNP code (Yuho Choi) - Dropi an unused assignment of pnp_device_id driver data (Uwe Kleine-König) * acpi-numa: ACPI: NUMA: remove redundant node_set() call * acpi-misc: ACPI: pmtmr: Convert to kernel-doc format docs: ACPI: DSD: motorcomm: fix docs build error ACPI: NVS: replace __get_free_page() with kmalloc() * pnp: PNP: Fix card device cleanup on registration failure PNP: Drop unused assignment of pnp_device_id driver data |
||
|
|
dc42307fae |
Merge branches 'acpi-processor', 'acpi-ec', 'acpi-fan' and 'acpi-battery'
Merge updates of the ACPI processor, EC, fan, and battery drivers for
7.3-rc1:
- Unregister the cpufreq notifier on init failure in the ACPI processor
driver (Can Peng)
- Validate MADT IOAPIC entry bounds during IOAPIC hotplug lookup in the
ACPI processor driver (Pengpeng Hou)
- Avoid _REG disconnect on probe deferrals related to GPIO IRQ in the
ACPI EC driver (Zhu Ling)
- Use a correct function parameter name in kernel-doc in the ACPI fan
driver (Randy Dunlap)
- Update ACPI fan IDs to follow modern style and clean up header file
inclusions in the ACPI fan driver (Andy Shevchenko)
- Use devm_acpi_install_notify_handler() to replace a custom open-coded
devres-based management of an ACPI notify handler in the ACPI fan
driver (Rafael Wysocki)
- Adjust charging status validation check in the ACPI battery driver to
avoid incorrect status reporting (Rafael Wysocki)
- Merge consecutive battery notifications in the ACPI battery driver to
reduce the pressure on STA, _BST and _BIX/_BIF ACPI control methods
and make that driver use kstrtoul() instead of sscanf("%lu\n") (Rong
Zhang)
- Sanitise model_number in the ACPI battery driver by dropping
unprintable characters (Kate Hsuan)
* acpi-processor:
ACPI: processor: Unregister cpufreq notifier on init failure
ACPI: processor: validate MADT IOAPIC entry bounds
* acpi-ec:
ACPI: EC: Avoid _REG disconnect on GPIO IRQ defer
* acpi-fan:
ACPI: fan: Use correct function parameter name in kernel-doc
ACPI: fan: Update ACPI fan IDs to follow modern style
ACPI: fan: Don't use "proxy" headers
ACPI: fan: Use devm_acpi_install_notify_handler()
* acpi-battery:
ACPI: battery: Adjust charging status validation check
ACPI: battery: Use kstrtoul() over sscanf("%lu\n")
ACPI: battery: Merge consecutive battery notifications
ACPI: battery: Sanitise model_number by dropping unprintable characters
|
||
|
|
e61487226b |
ACPI: APEI: Handle repeated SEA error storms
When hardware memory corruption occurs and a user process accesses the
corrupted page, the CPU triggers a Synchronous External Abort (SEA).
The kernel invokes do_sea() to handle the exception, which calls
memory_failure() to handle the faulty page.
Scenario 1: Memory Error Interrupt First, then SEA
The page is already poisoned by the memory error interrupt path. The
subsequent SEA handler sends a SIGBUS to the task, which accesses the
poisoned page. This flow is correct.
Scenario 2: SEA first, then memory error interrupt (problematic scenario)
If a user task directly accesses corrupted memory through a PFNMAP-style
mapping (e.g., devmem), the page may still be in the free-buddy state when
SEA is handled. In this case, memory_failure() will poison the page without
invoking kill_accessing_process(), and then takes the free-buddy recovery
path.
After the CPU returns to the task context, the task re-enters the SEA
handler due to the same access. However, ghes_estatus_cached() suppresses
all subsequent entries during the 10-second window, preventing
ghes_do_proc() from being called. This suppression blocks the
MF_ACTION_REQUIRED-based SIGBUS delivery, causing the kernel to fail to
kill the task immediately. Consequently, the process keeps re-entering
the SEA handler, leading to an SEA storm. Later, the memory error
interrupt path also cannot kill the task, leaving the system stuck in
this repeated loop.
The following error logs are explained using the devmem process:
NOTICE: SEA Handle
[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 9
[Hardware Error]: event severity: recoverable
[Hardware Error]: section_type: ARM processor error
[Hardware Error]: physical fault address: 0x0000001000093c00
[T54990] Memory failure: 0x1000093: recovery action for free buddy page: Recovered
[ T9955] EDAC MC0: 1 UE Multi-bit ECC on unknown memory
(page:0x1000093 offset:0xc00 grain:1 - APEI location: ...)
NOTICE: SEA Handle
NOTICE: SEA Handle
...
... ---> SEA storm
...
NOTICE: SEA Handle
[ T9955] Memory failure: 0x1000093: already hardware poisoned
ghes_print_estatus: 1 callbacks suppressed
[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 9
[Hardware Error]: event severity: recoverable
[Hardware Error]: section_type: ARM processor error
[Hardware Error]: physical fault address: 0x0000001000093c00
[T54990] Memory failure: 0x1000093: already hardware poisoned
[T54990] 0x1000093: Sending SIGBUS to devmem:54990 due to hardware memory corruption
To resolve this, return an error when encountering the same SEA again.
The subsequent SEA handler invocation uses arm64_notify_die() to send a
SIGBUS signal to the task, which terminates the process and prevents it
from re-entering the handler loop.
Signed-off-by: Junhao He <hejunhao3@h-partners.com>
Reviewed-by: Wupeng Ma <mawupeng1@huawei.com>
Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Link: https://patch.msgid.link/20260527082707.2013499-1-hejunhao3@h-partners.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||
|
|
a685d8eea4 |
ACPI: APEI: Fix ERST timeout unit conversion
The ACPI specification defines bits 63:32 returned by
GET_EXECUTE_OPERATION_TIMINGS as the maximum execution time in
microseconds. erst_get_timeout() instead multiplies the value by
NSEC_PER_MSEC.
Use NSEC_PER_USEC to express the firmware-provided microsecond timeout
in the nanosecond units expected by erst_timedout().
Fixes:
|
||
|
|
f6ac045369 |
Merge branches 'acpi-bus', 'acpi-sysfs', 'acpi-tables' and 'acpi-driver'
Merge ACPI bus type code updates, ACPI sysfs code updates related to exposing table data, updates of ACPI data-only table parsers and assorted driver changes related to ACPI support for 7.3-rc1: - Eliminate struct acpi_driver whose users have all been converted to bind to platform devices or auxiliary devices and set the "no power management" flag for all struct acpi_device objects (Rafael Wysocki) - Update kerneldoc comments of two structures in the ACPI bus type code to use correct struct member names to avoid warnings (Randy Dunlap) - Avoid complaints regarding missing _OSC features on platforms where OSC_CAPABILITIES_MASK_ERROR is set in _OSC error bits even though all of the requested features are actually acknowledged (Rafael Wysocki) - Use correct region struct for BERT region size check and properly map BERT and CCEL data to their ACPI tables (Thomas Renninger) - Clean up the list of included header files in the NHLT table parser and validate the table and record lengths in the FPDT parser (Andy Shevchenko and Pengpeng Hou) - Stop using acpi_device_name() in the PNP core, stop setting acpi_device_name/class() in the Xen variant of the ACPI PAD (Processor Aggregator Device) driver, and make the Loongarch laptop driver stop setting acpi_device_class() (Rafael Wysocki) * acpi-bus: ACPI: bus: Avoid confusing complaints regarding missing _OSC features ACPI: bus: Use correct struct member names ACPI: scan: Set power.no_pm for all struct acpi_device objects ACPI: bus: Eliminate struct acpi_driver * acpi-sysfs: ACPI: sysfs: Properly map BERT and CCEL data to their ACPI tables ACPI: Use correct region struct for BERT region size check * acpi-tables: ACPI: NHLT: Remove always included kconfig.h ACPI: FPDT: validate table and record lengths * acpi-driver: PNP: ACPI: Stop using acpi_device_name() ACPI: PAD: xen: Stop setting acpi_device_name/class() platform/loongarch: laptop: Stop setting acpi_device_class() |
||
|
|
903308ea40 |
ACPI: APEI: GHES: fix ARM section length accounting after header
In ghes_handle_arm_hw_error(), after skipping the cper_sec_proc_arm
header with (err + 1), the remaining length was reduced by sizeof(err)
(pointer size) instead of sizeof(*err) (structure size).
That overestimates the bytes left for cper_arm_err_info records and can
let the parser read past the CPER section when err_info_num is large
enough relative to error_data_length.
Use sizeof(*err) so the length accounting matches the pointer advance
and the earlier sizeof(*err) size check.
Fixes:
|
||
|
|
3d7ed9b8ef |
ACPI: video: Release PCI device reference after lookup
video_detect_portege_r100() uses pci_get_device() only as a boolean
check for the Trident CyberBlade XP4m32 device. pci_get_device() takes a
reference on a matching PCI device, but the callback returns without
releasing it.
Drop the reference after selecting the vendor backlight quirk so the PCI
device can be released normally.
Fixes:
|
||
|
|
fa608d2875 |
ACPI: PCI: Avoid misleading _OSC messages for non-PCIe host bridges without _OSC
After commit |
||
|
|
a3df8bbe0a |
ACPI: TAD: Add locking around AML evaluations
In the ACPI TAD driver, there are hidden assumptions that the ACPI
control methods used by it will not be evaluated concurrently due
to ACPICA namespace and interpreter locking.
However, that may not be the case since ACPICA may drop and re-acquire
the namespace and interpreter locks during the evaluation of a given
object in a few cases, including the one in which the AML in question
sleeps causing acpi_ex_system_do_sleep() to be called. In that case,
the evaluation of one control method may be started while the
evaluation of another one is still in progress.
For this reason, add a global lock to the ACPI TAD driver and
acquire it every time before evaluating an ACPI control method,
except for the initial evaluation of _GCP in acpi_tad_probe().
Fixes:
|
||
|
|
59a37f9200 |
cxl: Tighten CPER kfifo registration API and symbol visibility
Tighten the CPER protocol error kfifo registration API and symbol visibility. Use EXPORT_SYMBOL_FOR_MODULES() instead of EXPORT_SYMBOL_NS_GPL() for the CPER kfifo registration symbols. This names the consuming module explicitly and gives compile-time enforcement. Drop the work_struct argument from the unregister path. Change the WARN_ONCE condition to a NULL check since there is no caller pointer to compare against anymore. Return void from the registration helpers whose result callers ignore. cxl_cper_register_work() keeps its int return as the only one consumed by a caller. Flag double registration with WARN_ONCE() inside the lock instead of returning an error. Change cxl_ras_init() to void because there is one consumer and one producer so the error return was unnecessary. Remove the now-dead error check in cxl_core_init(). Co-developed-by: Terry Bowman <terry.bowman@amd.com> Signed-off-by: Terry Bowman <terry.bowman@amd.com> Signed-off-by: Dan Williams <djbw@kernel.org> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Alison Schofield <alison.schofield@intel.com> Link: https://patch.msgid.link/20260803221810.3685703-5-terry.bowman@amd.com Signed-off-by: Dave Jiang <dave.jiang@intel.com> |
||
|
|
6625ca499c |
acpi/apei/ghes: Use raw_spinlock_t for CXL CPER work locks
The CXL CPER work registration and unregistration helpers acquire cxl_cper_work_lock and cxl_cper_prot_err_work_lock with a spinlock guard(), which leaves local interrupts enabled. The corresponding post paths (cxl_cper_post_event(), cxl_cper_post_prot_err()) execute in hard IRQ context (they are called from the GHES error notification path) and acquire the same locks with an irqsave guard(). If a CPU is holding one of these locks via a spinlock guard() when a GHES interrupt arrives on the same CPU, the IRQ handler spins on the held lock waiting for it to release, while the lock holder is preempted by the IRQ. The result is a deadlock. Convert both locks from spinlock_t to raw_spinlock_t and use guard() at all call sites. On PREEMPT_RT kernels spinlock_t is backed by rt_mutex and sleeping from hard IRQ context is not permitted; raw_spinlock_t is safe in both contexts. Add WARN_ONCE to both register functions to surface double-registration bugs at runtime. Restructure both unregister functions to clear the global work pointer under the lock before calling cancel_work_sync(), closing the window where a CPER interrupt could schedule work on a pointer about to be freed. Add kfifo_reset() after cancel_work_sync() so stale entries are not replayed on next module load. Both kfifos are single-consumer: only one work_struct is registered at a time, enforced by the WARN_ONCE guard in the register functions. kfifo_reset() is safe outside the lock because cancel_work_sync() has already quiesced the consumer, and no new consumer can register until the current module exit completes and a fresh module init runs. Remove the redundant cancel_work_sync() call from cxl_ras_exit() and cxl_pci_driver_exit(). The CPER unregister functions now quiesce the work internally. Reported-by: Sashiko <sashiko@linuxfoundation.org> Signed-off-by: Terry Bowman <terry.bowman@amd.com> Fixes: |
||
|
|
525ba51157 |
ACPI: video: force native backlight on Acer Nitro AN515-46
The Acer Nitro AN515-46 is a hybrid graphics laptop whose internal
panel is driven by the AMD GPU (Radeon 680M); the discrete NVIDIA GPU
only drives external outputs. The firmware nevertheless advertises the
NVIDIA WMI EC backlight GUID, so the backlight type resolves to
nvidia_wmi_ec. The nvidia-wmi-ec-backlight driver however fails to
probe ("EC backlight control failed: AE_NOT_FOUND") and, since the
backlight type is still nvidia_wmi_ec, amdgpu skips registering its
own backlight device. The result is no backlight device at all,
leaving the brightness keys and the desktop brightness slider
non-functional.
Booting with acpi_backlight=native makes amdgpu register its backlight
interface and brightness control works. Add a DMI quirk to use the
native backlight on this model by default.
Signed-off-by: Marcos Paulo Medeiros <maarcospm1996@gmail.com>
Link: https://patch.msgid.link/20260727132151.12792-1-maarcospm1996@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||
|
|
b0f51f98fb |
ACPI: CPPC: Evaluate performance-control PCC use once
cppc_set_perf() evaluates the same immutable address-space predicates before and after each phase of a performance-control update. This repeats the three-control PCC test three times for every target request. Evaluate the predicate once after resolving the control descriptors and reuse the result throughout the transaction. Signed-off-by: Christian Loehle <christian.loehle@arm.com> Link: https://patch.msgid.link/20260803210527.1285229-4-christian.loehle@arm.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> |
||
|
|
9c5ab33a6d |
ACPI: CPPC: Avoid locking standalone full-width registers
cpc_write() serializes every SystemMemory write with the per-CPU rmw_lock. The lock is required for read-modify-write fields and for registers whose access units overlap, but not for a full-width register in a standalone access unit. The _CPC layout is immutable after it has been parsed. Classify each SystemMemory register at probe time and retain locking for partial fields, invalid access widths, and overlapping access units. Allow standalone full-width registers to bypass the descriptor lookup and spinlock. Store the classification in existing structure padding so that struct cpc_register_resource does not grow. Signed-off-by: Christian Loehle <christian.loehle@arm.com> Link: https://patch.msgid.link/20260803210527.1285229-3-christian.loehle@arm.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> |