Commit Graph

10325 Commits (09cfd3c52ea76f43b3cb15e570aeddf633d65e80)

Author SHA1 Message Date
Linus Torvalds 679a16399a ACPI updates for 6.18-rc1
- Add SoundWire File Table (SWFT) signature to ACPICA (Maciej Strozek)
 
  - Rearrange local variable definition involving #ifdef in ACPICA to
    avoid using uninitialized variables (Zhe Qiao)
 
  - Allow ACPICA to skip Global Lock initialization (Huacai Chen)
 
  - Apply ACPI_NONSTRING in more places in ACPICA and fix two regressions
    related to incorrect ACPI_NONSTRING usage (Ahmed Salem)
 
  - Fix printing CDAT table header when dissasebling CDAT AML (Ahmed
    Salem)
 
  - Use acpi_ds_clear_operands() in acpi_ds_call_control_method() in
    ACPICA (Hans de Goede)
 
  - Update dsmethod.c in ACPICA to address unused variable warning (Saket
    Dumbre)
 
  - Print error messages in ACPICA for too few or too many control method
    arguments (Saket Dumbre)
 
  - Update ACPICA version to 20250807 (Saket Dumbre)
 
  - Fix largest possible resource descriptor index in ACPICA (Dmitry
    Antipov)
 
  - Add Back-Invalidate restriction to CXL Window for CEDT in ACPICA
    (Davidlohr Bueso).
 
  - Add the package type to acceptable Arg3 types for _DSM in ACPICA
    because ACPI_TYPE_ANY does not cover it (Saket Dumbre)
 
  - Fix return values in ap_is_valid_checksum() in the acpidump utility
    in ACPICA (Kaushlendra Kumar)
 
  - Add Intel CVS ACPI HIDs to acpi_ignore_dep_ids[] so it is not
    regarded as real dependency (Hans de Goede)
 
  - Use ACPI_FREE() for freeing an ACPI object in description_show() in
    the ACPI sysfs-related code (Kaushlendra Kumar)
 
  - Fix memory leak in the ACPI processor idle driver registration error
    code path and optimize ACPI idle driver registration (Huisong Li,
    Rafael Wysocki)
 
  - Add module import namespace to the ACPI processor idle driver (Rafael
    Wysocki)
 
  - Eliminate static variable flat_state_cnt from the ACPI processor idle
    driver (Rafael Wysocki)
 
  - Release cpufreq policy references using __free() in the ACPI
    processor thremal driver (Zihuan Zhang)
 
  - Remove unused empty stubs of some functions and rearrange function
    declarations in a header file in the ACPI processor driver (Huisong
    Li)
 
  - Redefine two functions as void in the ACPI processor driver (Rafael
    Wysocki)
 
  - Stop exposing global variable acpi_idle_driver in the ACPI processor
    driver (Huisong Li)
 
  - Fix ACPI buffer properties extraction for data-only subnodes
    represented as _DSD-equivalent packages (Rafael Wysocki)
 
  - Fix handling of ACPI data-only subnodes represented as _DSD-equivalent
    packages in the case when they are embedded in larger _DSD-equivalent
    packages and clean up acpi_nondev_subnode_extract() (Rafael Wysocki)
 
  - Skip ACPI IRQ override on ASUS Vivobook Pro N6506CU (Sam van Kampen)
 
  - Add power resource init function and use it for introducing an HP
    EliteBook 855 G7 WWAN modem power resource quirk (Maciej Szmigiero)
 
  - Add support for DBG2 RISC-V SBI port subtype and Precise Baud Rate
    field to the ACPI SPCR table parser (Chen Pei)
 
  - Eliminate a dummy local variable from the ACPI thermal driver (Rafael
    Wysocki)
 
  - Fold two simple functions into their only caller in the ACPI fan
    driver (Rafael Wysocki)
 
  - Force native backlight on Lenovo 82K8 in the ACPI backlight (video)
    driver (Mario Limonciello)
 
  - Add missing sysfs_remove_group() for ACPI_TAD_RT (Daniel Tang)
 
  - Skip PRM handlers with NULL handler_address or NULL VA in the ACPI
    PRM driver (Shang song)
 
  - Remove redundant assignments in erst_dbg_{ioctl|write}() in the ACPI
    APEI driver (Thorsten Blum)
 
  - Allow the ACPI APEI EINJ to handle more types of addresses than just
    MMIO (Jiaqi Yan)
 
  - Use str_low_high() helper in two places in the ACPI code (Chelsy
    Ratnawat)
 
  - Use str_plural() to simplify the PNP code (Xichao Zhao)
 
  - Fix signedness issues in read/write helpers in the ACPI AML debugger
    interface (Amir Mohammad)
 -----BEGIN PGP SIGNATURE-----
 
 iQFGBAABCAAwFiEEcM8Aw/RY0dgsiRUR7l+9nS/U47UFAmjaj3ESHHJqd0Byand5
 c29ja2kubmV0AAoJEO5fvZ0v1OO1mKgH/A5eTwqfiQFvkhgQU/mP9v8Y0yV8p0qE
 W6xtzixsplk2bpV6IPcG8KA13EZMDGwkU+5xq2Jpsi/tipV58eyWv/i7TNaWNasM
 QaX7mVik/QOw2hb6Jdef2RdgJOwj1J6UimR+i58HNX0hlBTPsMyqY0yHf6gXDzNM
 CzS/A9kJUSvpCHav2tPoCr19ZLm+2GbgLoomGlqaM/Mxb6VyD7WnDeUYY2hOeZ4q
 pFabFcEMjB7SOHv5sDLCKzy/r9+AspM9GVRgLKiJkMv/DQ4YWJd4ZRarFQWD48ff
 sMX/DEg4M+YsaGCyHKLujloDpMnmg3MQYdvtmaf/Anf4VM/fkZPDkCY=
 =YK1m
 -----END PGP SIGNATURE-----

Merge tag 'acpi-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI updates from Rafael Wysocki:
 "These include an ACPICA update (upstream revision 20250807 with a few
  fixes on top), fixes and cleanups of the ACPI processor driver, fixes
  and cleanups of the ACPI properties management code, one more ACPI IRQ
  resource management quirk, one more ACPI backlight quirk, an ACPI
  device enumeration quirk related to _DEP, a power resource quirk
  related to WWAN modem for HP EliteBook 855 G7, ACPI SPCR table parser
  extensions, an ACPI APEI EINJ driver update allowing it to handle more
  address types, and several assorted cleanups of ACPI drivers and PNP
  code.

  Specifics:

   - Add SoundWire File Table (SWFT) signature to ACPICA (Maciej
     Strozek)

   - Rearrange local variable definition involving #ifdef in ACPICA to
     avoid using uninitialized variables (Zhe Qiao)

   - Allow ACPICA to skip Global Lock initialization (Huacai Chen)

   - Apply ACPI_NONSTRING in more places in ACPICA and fix two
     regressions related to incorrect ACPI_NONSTRING usage (Ahmed Salem)

   - Fix printing CDAT table header when dissasebling CDAT AML (Ahmed
     Salem)

   - Use acpi_ds_clear_operands() in acpi_ds_call_control_method() in
     ACPICA (Hans de Goede)

   - Update dsmethod.c in ACPICA to address unused variable warning
     (Saket Dumbre)

   - Print error messages in ACPICA for too few or too many control
     method arguments (Saket Dumbre)

   - Update ACPICA version to 20250807 (Saket Dumbre)

   - Fix largest possible resource descriptor index in ACPICA (Dmitry
     Antipov)

   - Add Back-Invalidate restriction to CXL Window for CEDT in ACPICA
     (Davidlohr Bueso)

   - Add the package type to acceptable Arg3 types for _DSM in ACPICA
     because ACPI_TYPE_ANY does not cover it (Saket Dumbre)

   - Fix return values in ap_is_valid_checksum() in the acpidump utility
     in ACPICA (Kaushlendra Kumar)

   - Add Intel CVS ACPI HIDs to acpi_ignore_dep_ids[] so it is not
     regarded as real dependency (Hans de Goede)

   - Use ACPI_FREE() for freeing an ACPI object in description_show() in
     the ACPI sysfs-related code (Kaushlendra Kumar)

   - Fix memory leak in the ACPI processor idle driver registration
     error code path and optimize ACPI idle driver registration (Huisong
     Li, Rafael Wysocki)

   - Add module import namespace to the ACPI processor idle driver
     (Rafael Wysocki)

   - Eliminate static variable flat_state_cnt from the ACPI processor
     idle driver (Rafael Wysocki)

   - Release cpufreq policy references using __free() in the ACPI
     processor thremal driver (Zihuan Zhang)

   - Remove unused empty stubs of some functions and rearrange function
     declarations in a header file in the ACPI processor driver (Huisong
     Li)

   - Redefine two functions as void in the ACPI processor driver (Rafael
     Wysocki)

   - Stop exposing global variable acpi_idle_driver in the ACPI
     processor driver (Huisong Li)

   - Fix ACPI buffer properties extraction for data-only subnodes
     represented as _DSD-equivalent packages (Rafael Wysocki)

   - Fix handling of ACPI data-only subnodes represented as
     _DSD-equivalent packages in the case when they are embedded in
     larger _DSD-equivalent packages and clean up
     acpi_nondev_subnode_extract() (Rafael Wysocki)

   - Skip ACPI IRQ override on ASUS Vivobook Pro N6506CU (Sam van
     Kampen)

   - Add power resource init function and use it for introducing an HP
     EliteBook 855 G7 WWAN modem power resource quirk (Maciej Szmigiero)

   - Add support for DBG2 RISC-V SBI port subtype and Precise Baud Rate
     field to the ACPI SPCR table parser (Chen Pei)

   - Eliminate a dummy local variable from the ACPI thermal driver
     (Rafael Wysocki)

   - Fold two simple functions into their only caller in the ACPI fan
     driver (Rafael Wysocki)

   - Force native backlight on Lenovo 82K8 in the ACPI backlight (video)
     driver (Mario Limonciello)

   - Add missing sysfs_remove_group() for ACPI_TAD_RT (Daniel Tang)

   - Skip PRM handlers with NULL handler_address or NULL VA in the ACPI
     PRM driver (Shang song)

   - Remove redundant assignments in erst_dbg_{ioctl|write}() in the
     ACPI APEI driver (Thorsten Blum)

   - Allow the ACPI APEI EINJ to handle more types of addresses than
     just MMIO (Jiaqi Yan)

   - Use str_low_high() helper in two places in the ACPI code (Chelsy
     Ratnawat)

   - Use str_plural() to simplify the PNP code (Xichao Zhao)

   - Fix signedness issues in read/write helpers in the ACPI AML
     debugger interface (Amir Mohammad)"

* tag 'acpi-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (50 commits)
  ACPI: debug: fix signedness issues in read/write helpers
  ACPI: processor: Do not expose global variable acpi_idle_driver
  ACPI: SPCR: Support Precise Baud Rate field
  ACPI: processor: idle: Redefine two functions as void
  ACPI: processor: Update cpuidle driver check in __acpi_processor_start()
  ACPI: processor: idle: Rearrange declarations in header file
  ACPI: processor: Remove unused empty stubs of some functions
  ACPI: property: Adjust failure handling in acpi_nondev_subnode_extract()
  ACPI: property: Do not pass NULL handles to acpi_attach_data()
  ACPI: property: Add code comments explaining what is going on
  ACPI: property: Disregard references in data-only subnode lists
  ACPI: property: Fix buffer properties extraction for subnodes
  ACPI: SPCR: Add support for DBG2 RISC-V SBI port subtype
  ACPI: APEI: EINJ: Allow more types of addresses except MMIO
  ACPI: APEI: Remove redundant assignments in erst_dbg_{ioctl|write}()
  ACPICA: acpidump: fix return values in ap_is_valid_checksum()
  ACPICA: ACPI_TYPE_ANY does not include the package type
  ACPICA: CEDT: Add Back-Invalidate restriction to CXL Window
  ACPICA: Fix largest possible resource descriptor index
  ACPICA: Update version to 20250807
  ...
2025-10-01 16:24:50 -07:00
Linus Torvalds 70de5572a8 Updates for the clocksource/clockevents drivers subsystem:
- Further preparations for modular clocksource/event drivers
 
   - The usual device tree updates to support new chip variants and the
     related changes to thise drivers
 
   - Avoid a 64-bit division in the TEGRA186 driver, which caused a build
     fail on 32-bit machines.
 
   - Small fixes, improvements and cleanups all over the place
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmjaTgwTHHRnbHhAbGlu
 dXRyb25peC5kZQAKCRCmGPVMDXSYoRwiD/9MdweTwv+Ami1i/4DAQzEcIuXqOnmO
 6yDnRXuqHguiuAkmCCwaW0IoqWZbIDtVwkMHv8CxDQoHm03wFg9QbMLN3YkR3D7P
 GWyWGKDMT5/ATQxvx/nZhFjpxnjRI7nFyQuooLIFgh8d9GvxBGFZOrdndudTW+dR
 FdLiv0+kyG9XDRijepUBXV9TSZNxZoF6IrlEbfSE0DFdmVAQhagN47QVhRk2cNux
 LhAp5wFJ/hzBRUIoQyPDAJFPpGrVC/Goz+ulgxmy4NRZ/TVoiAcdQrDTp1o8AOiV
 VxpNQ/pbPVSeij6zhZF1loHxDPDJGUlg9enx6NJDRk3CBNeu2Z617cBfuoCsEb45
 EmvyXLESQ8JzjIpGNzAgAuPa92OI0AJG7K4wg4mWzawUAD+Pvm3Xs+9rRareJ5t+
 OngGPHNhxMyRTO0z6BbFDZub3jv5PWEs/MB1a7O6XNVXokf2Wl4WgigWyKbEn+TU
 rjM34OgwQvcFVSE8nnwNEyzedpqJKAbvRG3WbHkucgkXEDtaLHZ9EWYIekcBYH39
 W4nXFWfQb8E29YmZifaq2KeaQI+Nb2utEyTMTmbZchVlZW7LBRxsfrhoyeNwYqc5
 byGvI4ZbvdNzDKq9JMD2H8P4//EneMrF/r13SoJTz9lGddjoobseKfTJArDrScXR
 fFCOVxwsJKRGNQ==
 =LZUc
 -----END PGP SIGNATURE-----

Merge tag 'timers-clocksource-2025-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull clocksource updates from Thomas Gleixner:

 - Further preparations for modular clocksource/event drivers

 - The usual device tree updates to support new chip variants and the
   related changes to thise drivers

 - Avoid a 64-bit division in the TEGRA186 driver, which caused a build
   fail on 32-bit machines.

 - Small fixes, improvements and cleanups all over the place

* tag 'timers-clocksource-2025-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (52 commits)
  dt-bindings: timer: exynos4210-mct: Add compatible for ARTPEC-9 SoC
  clocksource/drivers/sh_cmt: Split start/stop of clock source and events
  clocksource/drivers/clps711x: Fix resource leaks in error paths
  clocksource/drivers/arm_global_timer: Add auto-detection for initial prescaler values
  clocksource/drivers/ingenic-sysost: Convert from round_rate() to determine_rate()
  clocksource/drivers/timer-tegra186: Don't print superfluous errors
  clocksource/drivers/timer-rtl-otto: Simplify documentation
  clocksource/drivers/timer-rtl-otto: Do not interfere with interrupts
  clocksource/drivers/timer-rtl-otto: Drop set_counter function
  clocksource/drivers/timer-rtl-otto: Work around dying timers
  clocksource/drivers/timer-ti-dm : Capture functionality for OMAP DM timer
  clocksource/drivers/arm_arch_timer_mmio: Add MMIO clocksource
  clocksource/drivers/arm_arch_timer_mmio: Switch over to standalone driver
  clocksource/drivers/arm_arch_timer: Add standalone MMIO driver
  ACPI: GTDT: Generate platform devices for MMIO timers
  clocksource/drivers/nxp-pit: Add NXP Automotive s32g2 / s32g3 support
  dt: bindings: fsl,vf610-pit: Add compatible for s32g2 and s32g3
  clocksource/drivers/vf-pit: Rename the VF PIT to NXP PIT
  clocksource/drivers/vf-pit: Unify the function name for irq ack
  clocksource/drivers/vf-pit: Consolidate calls to pit_*_disable/enable
  ...
2025-09-30 16:53:59 -07:00
Rafael J. Wysocki c87072064b Merge branches 'acpi-apei', 'acpi-misc' and 'pnp'
Merge ACPI APEI updates, a miscellaneous update related to ACPI, and a
PNP update for 6.18-rc1:

 - Remove redundant assignments in erst_dbg_{ioctl|write}() in the ACPI
   APEI driver (Thorsten Blum)

 - Allow the ACPI APEI EINJ to handle more types of addresses than just
   MMIO (Jiaqi Yan)

 - Use str_low_high() helper in two places in the ACPI code (Chelsy
   Ratnawat)

 - Use str_plural() to simplify the PNP code (Xichao Zhao)

* acpi-apei:
  ACPI: APEI: EINJ: Allow more types of addresses except MMIO
  ACPI: APEI: Remove redundant assignments in erst_dbg_{ioctl|write}()

* acpi-misc:
  ACPI: Use str_low_high() helper in two places

* pnp:
  PNP: isapnp: use str_plural() to simplify the code
2025-09-29 15:28:51 +02:00
Rafael J. Wysocki 02e9542558 Merge branches 'acpi-thermal', 'acpi-fan', 'acpi-video', 'acpi-tad' and 'acpi-prm'
Merge an ACPI thermal zone driver update, an ACPI fan driver update, an
ACPI backlight (video) driver update, an ACPI TAD (time and alarm
device) driver update, and an ACPI PRM (platform runtime mechanism)
driver update for 6.18-rc1:

 - Eliminate a dummy local variable from the ACPI thermal driver (Rafael
   Wysocki)

 - Fold two simple functions into their only caller in the ACPI fan
   driver (Rafael Wysocki)

 - Force native backlight on Lenovo 82K8 in the ACPI backlight (video)
   driver (Mario Limonciello)

 - Add missing sysfs_remove_group() for ACPI_TAD_RT (Daniel Tang)

 - Skip PRM handlers with NULL handler_address or NULL VA in the ACPI
   PRM driver (Shang song)

* acpi-thermal:
  ACPI: thermal: Get rid of a dummy local variable

* acpi-fan:
  ACPI: fan: Fold two simple functions into their only caller

* acpi-video:
  ACPI: video: force native for Lenovo 82K8

* acpi-tad:
  ACPI: TAD: Add missing sysfs_remove_group() for ACPI_TAD_RT

* acpi-prm:
  ACPI: PRM: Skip handlers with NULL handler_address or NULL VA
2025-09-29 15:23:52 +02:00
Rafael J. Wysocki 6173176cf2 Merge branches 'acpi-property', 'acpi-resource', 'acpi-pm' and 'acpi-tables'
Merge updates of the ACPI device properties management code, ACPI
resources management code, ACPI power management, and ACPI data tables
parsing code for 6.18-rc1:

 - Fix ACPI buffer properties extraction for data-only subnodes
   represented as _DSD-equivalent packages (Rafael Wysocki)

 - Fix handling of ACPI data-only subnodes represented as _DSD-equivalent
   packages in the case when they are embedded in larger _DSD-equivalent
   packages and clean up acpi_nondev_subnode_extract() (Rafael Wysocki)

 - Skip ACPI IRQ override on ASUS Vivobook Pro N6506CU (Sam van Kampen)

 - Add power resource init function and use it for introducing an HP
   EliteBook 855 G7 WWAN modem power resource quirk (Maciej Szmigiero)

 - Add support for DBG2 RISC-V SBI port subtype and Precise Baud Rate
   field to the ACPI SPCR table parser (Chen Pei)

* acpi-property:
  ACPI: property: Adjust failure handling in acpi_nondev_subnode_extract()
  ACPI: property: Do not pass NULL handles to acpi_attach_data()
  ACPI: property: Add code comments explaining what is going on
  ACPI: property: Disregard references in data-only subnode lists
  ACPI: property: Fix buffer properties extraction for subnodes

* acpi-resource:
  ACPI: resource: Skip IRQ override on ASUS Vivobook Pro N6506CU

* acpi-pm:
  ACPI: PM: Add HP EliteBook 855 G7 WWAN modem power resource quirk
  ACPI: PM: Add power resource init function

* acpi-tables:
  ACPI: SPCR: Support Precise Baud Rate field
  ACPI: SPCR: Add support for DBG2 RISC-V SBI port subtype
2025-09-29 15:14:29 +02:00
Rafael J. Wysocki be61a77818 Merge branches 'acpi-scan', 'acpi-processor' and 'acpi-sysfs'
Merge an ACPI device enumeration update, ACPI processor driver updates,
and an ACPI sysfs-related code update for 6.18-rc1:

 - Add Intel CVS ACPI HIDs to acpi_ignore_dep_ids[] so it is not
   regarded as real dependency (Hans de Goede)

 - Use ACPI_FREE() for freeing an ACPI object in description_show() in
   the ACPI sysfs-related code (Kaushlendra Kumar)

 - Fix memory leak in the ACPI processor idle driver registration error
   code path and optimize ACPI idle driver registration (Huisong Li,
   Rafael Wysocki)

 - Add module import namespace to the ACPI processor idle driver (Rafael
   Wysocki)

 - Eliminate static variable flat_state_cnt from the ACPI processor idle
   driver (Rafael Wysocki)

 - Release cpufreq policy references using __free() in the ACPI
   processor thremal driver (Zihuan Zhang)

 - Remove unused empty stubs of some functions and rearrange function
   declarations in a header file in the ACPI processor driver (Huisong
   Li)

 - Redefine two functions as void in the ACPI processor driver (Rafael
   Wysocki)

 - Do not expose global variable acpi_idle_driver in the ACPI processor
   driver (Huisong Li)

* acpi-scan:
  ACPI: scan: Add Intel CVS ACPI HIDs to acpi_ignore_dep_ids[]

* acpi-processor:
  ACPI: processor: Do not expose global variable acpi_idle_driver
  ACPI: processor: idle: Redefine two functions as void
  ACPI: processor: Update cpuidle driver check in __acpi_processor_start()
  ACPI: processor: idle: Rearrange declarations in header file
  ACPI: processor: Remove unused empty stubs of some functions
  ACPI: processor: thermal: Release policy references using __free()
  ACPI: processor: idle: Fix function defined but not used warning
  ACPI: processor: idle: Eliminate static variable flat_state_cnt
  ACPI: processor: idle: Add module import namespace
  ACPI: processor: idle: Optimize ACPI idle driver registration
  ACPI: processor: idle: Fix memory leak when register cpuidle device failed

* acpi-sysfs:
  ACPI: sysfs: Use ACPI_FREE() for freeing an ACPI object
2025-09-29 15:12:52 +02:00
Rafael J. Wysocki ab80f7707d Merge branch 'acpica'
Merge ACPICA updates (20250807 release material with a few fixes on top)
for 6.18-rc1:

 - Add SoundWire File Table (SWFT) signature to ACPICA (Maciej Strozek)

 - Rearrange local variable definition involving #ifdef in ACPICA to
   avoid using uninitialized variables (Zhe Qiao)

 - Allow ACPICA to skip Global Lock initialization (Huacai Chen)

 - Apply ACPI_NONSTRING in more places in ACPICA and fix two regressions
   related to incorrect ACPI_NONSTRING usage (Ahmed Salem)

 - Fix printing CDAT table header when dissasebling CDAT AML (Ahmed
   Salem)

 - Use acpi_ds_clear_operands() in acpi_ds_call_control_method() in
   ACPICA (Hans de Goede)

 - Update dsmethod.c in ACPICA to address unused variable warning (Saket
   Dumbre)

 - Print error messages in ACPICA for too few or too many control method
   arguments (Saket Dumbre)

 - Update ACPICA version to 20250807 (Saket Dumbre)

 - Fix largest possible resource descriptor index in ACPICA (Dmitry
   Antipov)

 - Add Back-Invalidate restriction to CXL Window for CEDT in ACPICA
   (Davidlohr Bueso).

 - Add the package type to acceptable Arg3 types for _DSM in ACPICA
   because ACPI_TYPE_ANY does not cover it (Saket Dumbre)

 - Fix return values in ap_is_valid_checksum() in the acpidump utility
   in ACPICA (Kaushlendra Kumar)

* acpica:
  ACPICA: acpidump: fix return values in ap_is_valid_checksum()
  ACPICA: ACPI_TYPE_ANY does not include the package type
  ACPICA: CEDT: Add Back-Invalidate restriction to CXL Window
  ACPICA: Fix largest possible resource descriptor index
  ACPICA: Update version to 20250807
  ACPICA: Print error messages for too few or too many arguments
  ACPICA: Update dsmethod.c to get rid of unused variable warning
  ACPICA: dispatcher: Use acpi_ds_clear_operands() in acpi_ds_call_control_method()
  ACPICA: Debugger: drop ACPI_NONSTRING attribute from name_seg
  ACPICA: acpidump: drop ACPI_NONSTRING attribute from file_name
  ACPICA: iASL: Fix printing CDAT table header
  ACPICA: Apply ACPI_NONSTRING
  ACPICA: Allow to skip Global Lock initialization
  ACPICA: Change the compilation conditions
  ACPICA: Remove redundant "#ifdef" definitions
  ACPICA: Modify variable definition position
  ACPICA: Add SoundWire File Table (SWFT) signature
2025-09-29 15:10:54 +02:00
Amir Mohammad Jahangirzad 496f9372ea ACPI: debug: fix signedness issues in read/write helpers
In the ACPI debugger interface, the helper functions for read and write
operations use "int" as the length parameter data type. When a large
"size_t count" is passed from the file operations, this cast to "int"
results in truncation and a negative value due to signed integer
representation.

Logically, this negative number propagates to the min() calculation,
where it is selected over the positive buffer space value, leading to
unexpected behavior. Subsequently, when this negative value is used in
copy_to_user() or copy_from_user(), it is interpreted as a large positive
value due to the unsigned nature of the size parameter in these functions,
causing the copy operations to attempt handling sizes far beyond the
intended buffer limits.

Address the issue by:
 - Changing the length parameters in acpi_aml_read_user() and
   acpi_aml_write_user() from "int" to "size_t", aligning with the
   expected unsigned size semantics.
 - Updating return types and local variables in acpi_aml_read() and
   acpi_aml_write() to "ssize_t" for consistency with kernel file
   operation conventions.
 - Using "size_t" for the "n" variable to ensure calculations remain
   unsigned.
 - Using min_t() for circ_count_to_end() and circ_space_to_end() to
   ensure type-safe comparisons and prevent integer overflow.

Signed-off-by: Amir Mohammad Jahangirzad <a.jahangirzad@gmail.com>
Link: https://patch.msgid.link/20250923013113.20615-1-a.jahangirzad@gmail.com
[ rjw: Changelog tweaks, local variable definitions ordering adjustments ]
Fixes: 8cfb0cdf07 ("ACPI / debugger: Add IO interface to access debugger functionalities")
Cc: 4.5+ <stable@vger.kernel.org> # 4.5+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-23 15:45:28 +02:00
Huisong Li 559f2eacc8 ACPI: processor: Do not expose global variable acpi_idle_driver
Move the cpuidle driver check from __acpi_processor_start() to
acpi_processor_power_init() which allows variable acpi_idle_driver to
become static.

No intentional functional impact.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Link: https://patch.msgid.link/20250923032428.2656329-2-lihuisong@huawei.com
[ rjw: Subject tweak, new changelog, adjustment of a new comment ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-23 15:33:19 +02:00
Marc Zyngier 5669d92f3e ACPI: GTDT: Generate platform devices for MMIO timers
In preparation for the MMIO timer support code becoming an actual
driver, mimic what is done for the SBSA watchdog and expose
a synthetic device for each MMIO timer block.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Tested-by: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Link: https://lore.kernel.org/r/20250807160243.1970533-2-maz@kernel.org
2025-09-23 12:30:25 +02:00
Chen Pei 4d330fe541 ACPI: SPCR: Support Precise Baud Rate field
The Microsoft Serial Port Console Redirection (SPCR) specification
revision 1.09 comprises additional field: Precise Baud Rate [1].

It is used to describe non-traditional baud rates (such as those
used by high-speed UARTs).

It contains a specific non-zero baud rate which overrides the value
of the Configured Baud Rate field. If this field is zero or not
present, Configured Baud Rate is used.

Link: https://learn.microsoft.com/en-us/windows-hardware/drivers/serports/serial-port-console-redirection-table [1]
Signed-off-by: Chen Pei <cp0613@linux.alibaba.com>
Link: https://patch.msgid.link/20250913070815.16758-1-cp0613@linux.alibaba.com
[ rjw: Corrected typo in the subject ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-22 19:13:08 +02:00
Rafael J. Wysocki fbd401e95e ACPI: processor: idle: Redefine two functions as void
Notice that acpi_processor_power_init() and acpi_processor_power_exit()
don't need to return any values because their callers don't check them
anyway, so redefine those functions as void.

While at it, rearrange the code in acpi_processor_power_init() to
reduce the indentation level, get rid of a redundant local variable
in that function, and rephrase a code comment in it.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
2025-09-19 22:49:49 +02:00
Rafael J. Wysocki 8a1b5d412c ACPI: processor: Update cpuidle driver check in __acpi_processor_start()
Commit 7a8c994cbb ("ACPI: processor: idle: Optimize ACPI idle
driver registration") moved the ACPI idle driver registration to
acpi_processor_driver_init() and acpi_processor_power_init() does
not register an idle driver any more.

Accordingly, the cpuidle driver check in __acpi_processor_start() needs
to be updated to avoid calling acpi_processor_power_init() without a
cpuidle driver, in which case the registration of the cpuidle device
in that function would lead to a NULL pointer dereference in
__cpuidle_register_device().

Fixes: 7a8c994cbb ("ACPI: processor: idle: Optimize ACPI idle driver registration")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Link: https://patch.msgid.link/5044465.31r3eYUQgx@rafael.j.wysocki
[ rjw: Changelog update ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-19 22:49:49 +02:00
Rafael J. Wysocki 0f83b1d436 ACPI: property: Adjust failure handling in acpi_nondev_subnode_extract()
Make acpi_nondev_subnode_extract() follow the usual code flow pattern
in which failure is handled at the point where it is detected.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2025-09-16 19:51:37 +02:00
Rafael J. Wysocki baf60d5cb8 ACPI: property: Do not pass NULL handles to acpi_attach_data()
In certain circumstances, the ACPI handle of a data-only node may be
NULL, in which case it does not make sense to attempt to attach that
node to an ACPI namespace object, so update the code to avoid attempts
to do so.

This prevents confusing and unuseful error messages from being printed.

Also document the fact that the ACPI handle of a data-only node may be
NULL and when that happens in a code comment.  In addition, make
acpi_add_nondev_subnodes() print a diagnostic message for each data-only
node with an unknown ACPI namespace scope.

Fixes: 1d52f10917 ("ACPI: property: Tie data nodes to acpi handles")
Cc: 6.0+ <stable@vger.kernel.org> # 6.0+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2025-09-16 19:51:37 +02:00
Rafael J. Wysocki 737c3a09dc ACPI: property: Add code comments explaining what is going on
In some places in the ACPI device properties handling code, it is
unclear why the code is what it is.  Some assumptions are not documented
and some pieces of code are based on knowledge that is not mentioned
anywhere.

Add code comments explaining these things.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2025-09-16 19:51:37 +02:00
Rafael J. Wysocki d06118fe9b ACPI: property: Disregard references in data-only subnode lists
Data-only subnode links following the ACPI data subnode GUID in a _DSD
package are expected to point to named objects returning _DSD-equivalent
packages.  If a reference to such an object is used in the target field
of any of those links, that object will be evaluated in place (as a
named object) and its return data will be embedded in the outer _DSD
package.

For this reason, it is not expected to see a subnode link with the
target field containing a local reference (that would mean pointing
to a device or another object that cannot be evaluated in place and
therefore cannot return a _DSD-equivalent package).

Accordingly, simplify the code parsing data-only subnode links to
simply print a message when it encounters a local reference in the
target field of one of those links.

Moreover, since acpi_nondev_subnode_data_ok() would only have one
caller after the change above, fold it into that caller.

Link: https://lore.kernel.org/linux-acpi/CAJZ5v0jVeSrDO6hrZhKgRZrH=FpGD4vNUjFD8hV9WwN9TLHjzQ@mail.gmail.com/
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2025-09-16 19:51:37 +02:00
Rafael J. Wysocki d0759b1098 ACPI: property: Fix buffer properties extraction for subnodes
The ACPI handle passed to acpi_extract_properties() as the first
argument represents the ACPI namespace scope in which to look for
objects returning buffers associated with buffer properties.

For _DSD objects located immediately under ACPI devices, this handle is
the same as the handle of the device object holding the _DSD, but for
data-only subnodes it is not so.

First of all, data-only subnodes are represented by objects that
cannot hold other objects in their scopes (like control methods).
Therefore a data-only subnode handle cannot be used for completing
relative pathname segments, so the current code in
in acpi_nondev_subnode_extract() passing a data-only subnode handle
to acpi_extract_properties() is invalid.

Moreover, a data-only subnode of device A may be represented by an
object located in the scope of device B (which kind of makes sense,
for instance, if A is a B's child).  In that case, the scope in
question would be the one of device B.  In other words, the scope
mentioned above is the same as the scope used for subnode object
lookup in acpi_nondev_subnode_extract().

Accordingly, rearrange that function to use the same scope for the
extraction of properties and subnode object lookup.

Fixes: 103e10c69c ("ACPI: property: Add support for parsing buffer property UUID")
Cc: 6.0+ <stable@vger.kernel.org> # 6.0+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2025-09-16 19:51:37 +02:00
Chen Pei bf4206d7ac ACPI: SPCR: Add support for DBG2 RISC-V SBI port subtype
Commit 4aca2bef90 ("ACPICA: Headers: Add RISC-V SBI Subtype to
DBG2") added the definition of ACPI_DBG2_RISCV_SBI_CON.

Continue to implement its function so that the parameters of UART can
be configured correctly.

Subsequent calls to setup_earlycon() will reuse the earlycon based on
SBI.

Signed-off-by: Chen Pei <cp0613@linux.alibaba.com>
Reviewed-by: Guo Ren (Alibaba Damo Academy) <guoren@kernel.org>
Link: https://patch.msgid.link/20250910094136.4423-1-cp0613@linux.alibaba.com
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-15 21:37:40 +02:00
Jiaqi Yan 7d444f5099 ACPI: APEI: EINJ: Allow more types of addresses except MMIO
EINJ driver today only allows injection request to go through for two
kinds of IORESOURCE_MEM: IORES_DESC_PERSISTENT_MEMORY and
IORES_DESC_SOFT_RESERVED. This check prevents user of EINJ to test
memory corrupted in many interesting areas:

 - Legacy persistent memory
 - Memory claimed to be used by ACPI tables or NV storage
 - Kernel crash memory and others

There is need to test how kernel behaves when something consumes memory
errors in these memory regions. For example, if certain ACPI table is
corrupted, does kernel crash gracefully to prevent "silent data
corruption". For another example, legacy persistent memory, when managed
by Device DAX, does support recovering from Machine Check Exception
raised by memory failure, hence worth to be tested.

However, attempt to inject memory error via EINJ to legacy persistent
memory or ACPI owned memory fails with -EINVAL.

Allow EINJ to inject at address except it is MMIO. Leave it to the BIOS
or firmware to decide what is a legitimate injection target.

In addition to the test done in [1], on a machine having the following
iomem resources:

    ...
    01000000-08ffffff : Crash kernel
    768f0098-768f00a7 : APEI EINJ
    ...
  768f4000-77323fff : ACPI Non-volatile Storage
  77324000-777fefff : ACPI Tables
  777ff000-777fffff : System RAM
  77800000-7fffffff : Reserved
  80000000-8fffffff : PCI MMCONFIG 0000 [bus 00-ff]
  90040000-957fffff : PCI Bus 0000:00
  ...
  300000000-3ffffffff : Persistent Memory (legacy)
  ...

I commented __einj_error_inject during the test and just tested when
injecting a memory error at each start address shown above:
- 0x80000000 and 0x90040000 both failed with EINVAL
- request passed through for all other addresses

Link: https://lore.kernel.org/linux-acpi/20250825223348.3780279-1-jiaqiyan@google.com [1]
Signed-off-by: Jiaqi Yan <jiaqiyan@google.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Link: https://patch.msgid.link/20250910044531.264043-1-jiaqiyan@google.com
[ rjw: Adding a link tag for the [1] reference ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-15 21:32:29 +02:00
Thorsten Blum e06722a9df ACPI: APEI: Remove redundant assignments in erst_dbg_{ioctl|write}()
Use the result of copy_from_user() directly instead of assigning it to
the local variable 'rc' and then overwriting it in erst_dbg_write() or
immediately returning from erst_dbg_ioctl().

No intentional functional changes.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>
Link: https://patch.msgid.link/20250903224913.242928-2-thorsten.blum@linux.dev
[ rjw: Changelog edit ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-15 21:21:57 +02:00
Saket Dumbre 81f92cff6d ACPICA: ACPI_TYPE_ANY does not include the package type
So add it to the list of acceptable Arg3 types for _DSM.

Link: https://github.com/acpica/acpica/commit/6eb81e7c
Signed-off-by: Saket Dumbre <saket.dumbre@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-15 12:20:13 +02:00
Dmitry Antipov 8ca944fea4 ACPICA: Fix largest possible resource descriptor index
ACPI_RESOURCE_NAME_LARGE_MAX should be equal to the last actually
used resource descriptor index (ACPI_RESOURCE_NAME_CLOCK_INPUT).

Otherwise 'resource_index' in 'acpi_ut_validate_resource()' may be
clamped incorrectly and resulting value may issue an out-of-bounds
access for 'acpi_gbl_resource_types' array. Compile tested only.

Fixes: 520d4a0ee5 ("ACPICA: add support for ClockInput resource (v6.5)")
Link: https://github.com/acpica/acpica/commit/cf00116c
Link: https://marc.info/?l=linux-acpi&m=175449676131260&w=2
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-15 12:20:13 +02:00
Saket Dumbre e2c80b3c23 ACPICA: Print error messages for too few or too many arguments
Fix Issue #1027 by displaying error messages when there are too few or
too many arguments in the caller vs the definition of an ASL/AML method.

Link: https://github.com/acpica/acpica/commit/cbc243e4
Reported-by: Peter Williams <peter@newton.cx>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Hans de Goede <hansg@kernel.org>
Signed-off-by: Saket Dumbre <saket.dumbre@intel.com>
2025-09-15 12:20:13 +02:00
Saket Dumbre 761dc71c60 ACPICA: Update dsmethod.c to get rid of unused variable warning
All the 3 major C compilers (MSVC, GCC, LLVM/Clang) warn about
the unused variable i after the removal of its usage by PR #1031
addressing Issue #1027

Link: https://github.com/acpica/acpica/commit/6d235320
Signed-off-by: Saket Dumbre <saket.dumbre@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-15 12:20:13 +02:00
Hans de Goede e9dff11a7a ACPICA: dispatcher: Use acpi_ds_clear_operands() in acpi_ds_call_control_method()
When deleting the previous walkstate operand stack
acpi_ds_call_control_method() was deleting obj_desc->Method.param_count
operands. But Method.param_count does not necessarily match
this_walk_state->num_operands, it may be either less or more.

After correcting the for loop to check `i < this_walk_state->num_operands`
the code is identical to acpi_ds_clear_operands(), so just outright
replace the code with acpi_ds_clear_operands() to fix this.

Link: https://github.com/acpica/acpica/commit/53fc0220
Signed-off-by: Hans de Goede <hansg@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-15 12:20:13 +02:00
Ahmed Salem 22c65572ef ACPICA: Debugger: drop ACPI_NONSTRING attribute from name_seg
ACPICA commit 4623b3369f3aa1ec5229d461e91c514510a96912

Partially revert commit 70662db73d ("ACPICA: Apply ACPI_NONSTRING in
more places") as I've yet again incorrectly applied the ACPI_NONSTRING
attribute where it is not needed.

A warning was initially reported by Collin Funk [1], and further review
by Jiri Slaby [2] highlighted another issue related to the same commit.

Drop the ACPI_NONSTRING attribute to fix the issue.

Fixes: 70662db73d ("ACPICA: Apply ACPI_NONSTRING in more places")
Link: https://lore.kernel.org/all/87ecvpcypw.fsf@gmail.com [1]
Link: https://lore.kernel.org/all/5c210121-c9b8-4458-b1ad-0da24732ac72@kernel.org [2]
Link: https://github.com/acpica/acpica/commit/4623b336
Reported-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Ahmed Salem <x0rw3ll@gmail.com>
Cc: 6.16+ <stable@vger.kernel.org> # 6.16+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-15 12:20:12 +02:00
Ahmed Salem 4b020eff66 ACPICA: iASL: Fix printing CDAT table header
When disassembling CDAT AML, the lack of CDAT's common ACPI table header
should be taken into consideration when printing the table's actual
header. As the table header lacks fields like Signature, header
information is mangled and incorrect:

 # $ iasl -d -ds CDAT cdat.aml
 # Input file cdat.aml, Length 0xE4 (228) bytes
 # ACPI: ?    0x0000000000000000 000C01 (v00        ?        00180000 ??   23456789)

Both Signature and Length are printed incorrectly, and the remaining
fields are not applicable for this special table. To fix this, verify
acpi_gbl_CDAT is set (<-ds CDAT> via command line) and Header->Signature
is an invalid nameseg (due to the presence of non-ASCII char(s)), then
print only the explicitly-passed signature (ACPI_SIG_CDAT) and the table
length as cast with a pointer to the struct acpi_table_cdat structure.

Link: https://github.com/acpica/acpica/commit/2b5586b4
Signed-off-by: Ahmed Salem <x0rw3ll@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-15 12:20:12 +02:00
Huacai Chen feb8ae81b2 ACPICA: Allow to skip Global Lock initialization
Introduce acpi_gbl_use_global_lock, which allows to skip the Global Lock
initialization. This is useful for systems without Global Lock (such as
loong_arch), so as to avoid error messages during boot phase:

 ACPI Error: Could not enable global_lock event (20240827/evxfevnt-182)
 ACPI Error: No response from Global Lock hardware, disabling lock (20240827/evglock-59)

Link: https://github.com/acpica/acpica/commit/463cb0fe
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-15 12:20:12 +02:00
Zhe Qiao 9d2f57fee5 ACPICA: Change the compilation conditions
To prevent the risk of undefined variables.

Link: https://github.com/acpica/acpica/commit/9f86d4c9
Signed-off-by: Zhe Qiao <qiaozhe@iscas.ac.cn>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-15 12:20:12 +02:00
Zhe Qiao 2926d3753a ACPICA: Remove redundant "#ifdef" definitions
Link: https://github.com/acpica/acpica/commit/204776a3
Signed-off-by: Zhe Qiao <qiaozhe@iscas.ac.cn>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-15 12:20:12 +02:00
Zhe Qiao 3104fc98cb ACPICA: Modify variable definition position
To prevent potential undefined risks.

Link: https://github.com/acpica/acpica/commit/efc4d8ab
Signed-off-by: Zhe Qiao <qiaozhe@iscas.ac.cn>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-15 12:20:12 +02:00
Zihuan Zhang 2167bb92bd ACPI: processor: thermal: Release policy references using __free()
Replace the manual cpufreq_cpu_put() with __free(put_cpufreq_policy)
for policy references. This reduces the risk of reference counting
mistakes and aligns the code with the latest kernel style.

No functional change intended.

Signed-off-by: Zihuan Zhang <zhangzihuan@kylinos.cn>
Link: https://patch.msgid.link/20250905132413.1376220-3-zhangzihuan@kylinos.cn
[ rjw: Subject and changelog edits, whitespace fixups ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-08 19:53:32 +02:00
Linus Torvalds 00e6982822 Several RISC-V fixes for v6.17-rc5:
- An LTO fix for clang when building with CONFIG_CMODEL_MEDLOW
 
 - A fix for ACPI CPPC CSR read/write return values
 
 - Several fixes for incorrect access widths in thread_info.cpu reads
 
 - A fix for an issue in __put_user_nocheck() that was causing the glibc
   tst-socket-timestamp test to fail
 
 - A fix to initialize struct kexec_buf records in several kexec-related
   functions, which were generating UBSAN warnings
 
 - Two fixes for sparse warnings
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEElRDoIDdEz9/svf2Kx4+xDQu9KksFAmi7X/YACgkQx4+xDQu9
 KkvvqRAAnZwgWgOJYPSrlpoxZ/uk/J8tU5ULsdkEs/l79Yl1geCk/Jh7xGJo4ROI
 HvSZPC4s4D7MPtXkV7VFwqAVl1betNAvTB13eIkmLrMHuDoh9EqBbG3CBvPeKY+l
 I0eRp5uSGGIccdLFaTqmO+IHp6SiCj6xTshUme8TT5+UuDdDiducucDtNUSveYNI
 ehRyuNR6Kw7vATnQHOqwnbHgAxA8mtzFjJVvd/C89C79B6D965+urN+tPhGoYBe0
 R9zEhxKPdtsnE0KZfE2sNt7q9V59O7Nsl9Q2YjXY3q3t7xPeEyhDMnYrK7XJ3cRj
 VRy0UkF233WKbmD8jne6p/BVw1nC/ktK8a/j6ZiXK61WhuJviv52LZIbhswq4/R/
 ssI55ne0WkDS2VtmiNibGRP8tBuiajqmjMiE83o620Q5zHt4fA0fQN2SbBj5P441
 CprhRCCxOLdczQIZWnZx8aYJuPYKbFaoVz+YCGZD9hN1TzKKO1K3eshVym/Jr6K4
 Ez2CMJXVCycy5vlwOeQqIEEVsnZ43tvXS+O0wc9bFVP27JVXNmN0geU79S0acw8z
 3XOP8LtlY37Uxz0O2cakygVL859WpDbTJe5ECi2L+m57XXXFOVqa1yIF8+/kG8+B
 lB3dOwWjCiR1hwNHRxon8CWvCmUBaHRwYmCTmMpSRs53mHhyRpE=
 =o1+b
 -----END PGP SIGNATURE-----

Merge tag 'riscv-for-linus-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V fixes from Paul Walmsley:

 - LTO fix for clang when building with CONFIG_CMODEL_MEDLOW

 - Fix for ACPI CPPC CSR read/write return values

 - Several fixes for incorrect access widths in thread_info.cpu reads

 - Fix an issue in __put_user_nocheck() that was causing the glibc
   tst-socket-timestamp test to fail

 - Initialize struct kexec_buf records in several kexec-related
   functions, which were generating UBSAN warnings

 - Two fixes for sparse warnings

* tag 'riscv-for-linus-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  riscv: Fix sparse warning about different address spaces
  riscv: Fix sparse warning in __get_user_error()
  riscv: kexec: Initialize kexec_buf struct
  riscv: use lw when reading int cpu in asm_per_cpu
  riscv, bpf: use lw when reading int cpu in bpf_get_smp_processor_id
  riscv, bpf: use lw when reading int cpu in BPF_MOV64_PERCPU_REG
  riscv: uaccess: fix __put_user_nocheck for unaligned accesses
  riscv: use lw when reading int cpu in new_vmalloc_check
  ACPI: RISC-V: Fix FFH_CPPC_CSR error handling
  riscv: Only allow LTO with CMODEL_MEDANY
2025-09-07 08:15:56 -07:00
Linus Torvalds e5d5d23319 arm64 fixes:
- Incorrect __BITS_PER_LONG as 64 when compiling the compat vDSO
 
  - Unreachable PLT for ftrace_caller() in a module's .init.text
    following past reworking of the module VA range selection
 
  - Memory leak in the ACPI iort_rmr_alloc_sids() after a failed
    krealloc_array()
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE5RElWfyWxS+3PLO2a9axLQDIXvEFAmi7HWkACgkQa9axLQDI
 XvHFIA/9HzHNNmtcUYKL3wIEuzF9Qc+SQDpKU7bl4kuJK0o6YaVa+1oTXHdSnkWz
 yVAla4sXd9HW8k8He4S0ELMiYk0fcPmg61M1ci4Y/8keiHBvxhMPe1vHnRLPrPAo
 fc2g2R1F1uXkOZGQ3g0hlG3wz7SrjdJdPDBs5fD0eB3QDIge6DIm3WBQygX58lCE
 Px8nMH8FrUEZJYF05i8L0x9b2jzilXkvnN/ZLX8HqNpWdULFtYHCpLsRl2LmJ8+B
 QaVMyAoFORtI5jlmHFz5ZVpqljTUnEpIm9CTH0FGMQ5VraDVbuI8HEhygBRcUjQM
 r7oT3EIy6P+wAV/oJ95TbapEwOoIJxcu0YUAkluPKKXGFckvLlg2QV+xD4NgCOXv
 tDvakWNKaUOMR0o8BqS0zPDcHE94ndrw7akU3uiccimz2spNquE/vkiHQ1B4q8FJ
 A2HT9VqJE5VdApKVNIsQntiwxfnEbFwv7yDxNz4qZWgk3Zl1hLPOSZztywuQz2ws
 dbeNu1hM75xKuiTs3aRPJpTu1MnECqNSmrvqim/uJsyFPOqgtVHBoittT3/KiAsH
 12rE3EIKuJHoqpxli+9AJS30JYc0OWDfkvB2hBvPPHpWEkzbEXPR2hHXzIrj4puZ
 RLmuZCIg7sZniH3zRjdSHXivESmtWmbf1WAF3JwC7GIH3AYEKzY=
 =LUMm
 -----END PGP SIGNATURE-----

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:

 - Incorrect __BITS_PER_LONG as 64 when compiling the compat vDSO

 - Unreachable PLT for ftrace_caller() in a module's .init.text
   following past reworking of the module VA range selection

 - Memory leak in the ACPI iort_rmr_alloc_sids() after a failed
   krealloc_array()

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: ftrace: fix unreachable PLT for ftrace_caller in init_module with CONFIG_DYNAMIC_FTRACE
  ACPI/IORT: Fix memory leak in iort_rmr_alloc_sids()
  arm64: uapi: Provide correct __BITS_PER_LONG for the compat vDSO
2025-09-05 13:11:10 -07:00
Anup Patel 5b3706597b ACPI: RISC-V: Fix FFH_CPPC_CSR error handling
The cppc_ffh_csr_read() and cppc_ffh_csr_write() returns Linux error
code in "data->ret.error" so cpc_read_ffh() and cpc_write_ffh() must
not use sbi_err_map_linux_errno() for FFH_CPPC_CSR.

Fixes: 30f3ffbee8 ("ACPI: RISC-V: Add CPPC driver")
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Troy Mitchell <troy.mitchell@linux.dev>
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
Reviewed-by: Nutty Liu <nutty.liu@hotmail.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250818143600.894385-2-apatel@ventanamicro.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
2025-09-04 16:25:50 -06:00
Sam van Kampen 3a351de0d9 ACPI: resource: Skip IRQ override on ASUS Vivobook Pro N6506CU
Just like the other Vivobooks here, the N6506CU has its keyboard IRQ
described as ActiveLow in the DSDT, which the kernel overrides to
EdgeHigh, causing the internal keyboard not to work.

Add the N6506CU to the irq1_level_low_skip_override[] quirk table to fix
this.

Signed-off-by: Sam van Kampen <sam@tehsvk.net>
Link: https://patch.msgid.link/20250829145221.2294784-2-sam@tehsvk.net
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-04 20:29:39 +02:00
Hans de Goede 4405a214df ACPI: scan: Add Intel CVS ACPI HIDs to acpi_ignore_dep_ids[]
Some x86/ACPI laptops with MIPI cameras have a INTC10DE or INTC10E0 ACPI
device in the _DEP dependency list of the ACPI devices for the camera-
sensors (which have flags.honor_deps set).

These devices are for an Intel Vision CVS chip for which an out of tree
driver is available [1].

The camera sensor works fine without a driver being loaded for this
ACPI device on the 2 laptops this was tested on:

ThinkPad X1 Carbon Gen 12 (Meteor Lake)
ThinkPad X1 2-in-1 Gen 10 (Arrow Lake)

For now add these HIDs to acpi_ignore_dep_ids[] so that
acpi_dev_ready_for_enumeration() will return true once the other _DEP
dependencies are met and an i2c_client for the camera sensor will get
instantiated.

Link: https://github.com/intel/vision-drivers/ [1]
Signed-off-by: Hans de Goede <hansg@kernel.org>
Link: https://patch.msgid.link/20250829142748.21089-1-hansg@kernel.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-04 20:26:50 +02:00
Rafael J. Wysocki 7a9490a1c9 ACPI: fan: Fold two simple functions into their only caller
Both acpi_fan_has_fst() and acpi_fan_is_acpi4() are called from one
place only, so fold them both into there caller which yields slightly
leaner code that is somewhat easier to follow.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/3386797.aeNJFYEL58@rafael.j.wysocki
2025-09-04 20:24:11 +02:00
Rafael J. Wysocki 3f6b537a13 ACPI: thermal: Get rid of a dummy local variable
The second argument of acpi_bus_update_power() can be NULL, so drop the
power_state dummy local variable in acpi_thermal_resume() used just for
avoiding passing NULL as the second argument to that function.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/13851842.uLZWGnKmhe@rafael.j.wysocki
2025-09-04 20:22:33 +02:00
Daniel Tang 4aac453dec ACPI: TAD: Add missing sysfs_remove_group() for ACPI_TAD_RT
Previously, after `rmmod acpi_tad`, `modprobe acpi_tad` would fail
with this dmesg:

sysfs: cannot create duplicate filename '/devices/platform/ACPI000E:00/time'
Call Trace:
 <TASK>
 dump_stack_lvl+0x6c/0x90
 dump_stack+0x10/0x20
 sysfs_warn_dup+0x8b/0xa0
 sysfs_add_file_mode_ns+0x122/0x130
 internal_create_group+0x1dd/0x4c0
 sysfs_create_group+0x13/0x20
 acpi_tad_probe+0x147/0x1f0 [acpi_tad]
 platform_probe+0x42/0xb0
 </TASK>
acpi-tad ACPI000E:00: probe with driver acpi-tad failed with error -17

Fixes: 3230b2b3c1 ("ACPI: TAD: Add low-level support for real time capability")
Signed-off-by: Daniel Tang <danielzgtg.opensource@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Link: https://patch.msgid.link/2881298.hMirdbgypa@daniel-desktop3
Cc: 5.2+ <stable@vger.kernel.org> # 5.2+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-04 20:19:36 +02:00
Miaoqian Lin f3ef711092 ACPI/IORT: Fix memory leak in iort_rmr_alloc_sids()
If krealloc_array() fails in iort_rmr_alloc_sids(), the function returns
NULL but does not free the original 'sids' allocation. This results in a
memory leak since the caller overwrites the original pointer with the
NULL return value.

Fixes: 491cf4a673 ("ACPI/IORT: Add support to retrieve IORT RMR reserved regions")
Cc: <stable@vger.kernel.org> # 6.0.x
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Link: https://lore.kernel.org/r/20250828112243.61460-1-linmq006@gmail.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2025-09-04 17:00:01 +01:00
Shang song (Lenovo) 311942ce76 ACPI: PRM: Skip handlers with NULL handler_address or NULL VA
If handler_address or mapped VA is NULL, the related buffer address and
VA can be ignored, so make acpi_parse_prmt() skip the current handler
in those cases.

Signed-off-by: Shang song (Lenovo) <shangsong2@foxmail.com>
Link: https://patch.msgid.link/20250826030229.834901-1-shangsong2@foxmail.com
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-04 16:21:41 +02:00
Rafael J. Wysocki e4c628e91c ACPI: processor: idle: Eliminate static variable flat_state_cnt
Instead of using static variable flat_state_cnt to pass data between
functions involved in the _LPI information processing, pass the current
number of "flattened" idle states to flatten_lpi_states() and make it
return the updated number of those states.  At the same time, use a
local variable called state_count to store the number of "flattened"
idle states found so far in acpi_processor_get_lpi_info().

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Tested-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: lihuisong@huawei.com
Link: https://patch.msgid.link/10715991.nUPlyArG6x@rafael.j.wysocki
2025-09-02 16:08:53 +02:00
Rafael J. Wysocki eb58738d15 ACPI: processor: idle: Add module import namespace
Add a new module import namespace called ACPI_PROCESSOR_IDLE for
functions exported from the non-modular part of the ACPI processor
driver to the modular part of it.

Export acpi_processor_claim_cst_control() and acpi_processor_evaluate_cst()
in that namespace to hide them from unrelated modules.

They are also used by the intel_idle driver, but it is non-modular,
so it can call them regardless of the way the symbols are exported.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/3376499.aeNJFYEL58@rafael.j.wysocki
2025-09-02 16:08:53 +02:00
Huisong Li 7a8c994cbb ACPI: processor: idle: Optimize ACPI idle driver registration
Currently, the ACPI idle driver is registered from within a CPU
hotplug callback. Although this didn't cause any functional issues,
this is questionable and confusing. And it is better to register
the cpuidle driver when all of the CPUs have been brought up.

So add a new function to initialize acpi_idle_driver based on the
power management information of an available CPU and register cpuidle
driver in acpi_processor_driver_init().

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Link: https://patch.msgid.link/20250728070612.1260859-3-lihuisong@huawei.com
[ rjw: Added missing inline modifiers ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-02 16:08:25 +02:00
Chelsy Ratnawat 39c8788760 ACPI: Use str_low_high() helper in two places
Replace hard-coded string choices with the str_low_high() helper
in two places in the ACPI code.

Signed-off-by: Chelsy Ratnawat <chelsyratnawat2001@gmail.com>
Link: https://patch.msgid.link/20250823220311.2035533-1-chelsyratnawat2001@gmail.com
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-08-25 20:25:53 +02:00
Kaushlendra Kumar 149139ddcb ACPI: sysfs: Use ACPI_FREE() for freeing an ACPI object
Since str_obj is allocated by ACPICA in acpi_evaluate_object_typed(),
it should be free with ACPI_FREE() rather than with kfree(), so use
the former instead of the latter for freeing it.

Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Link: https://patch.msgid.link/20250822061946.472594-1-kaushlendra.kumar@intel.com
[ rjw: Subject and changelog rewrite ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-08-25 20:21:44 +02:00
Mario Limonciello (AMD) f144bc21be ACPI: video: force native for Lenovo 82K8
Lenovo 82K8 has a broken brightness control provided by nvidia_wmi_ec.
Add a quirk to prevent using it.

Reported-by: Wilson Alvarez <wilson.e.alvarez@rubonnek.com>
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4512
Tested-by: Wilson Alvarez <wilson.e.alvarez@rubonnek.com>
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Link: https://patch.msgid.link/20250820170927.895573-1-superm1@kernel.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-08-25 20:00:17 +02:00
Maciej Strozek ac46f5b6c6 ACPICA: Add SoundWire File Table (SWFT) signature
The File Download (FDL) process of SoundWire Class Audio (SDCA) driver,
which provides code/data which may be required by an SDCA device,
utilizes SWFT to obtain that code/data. There is a single SWFT for the
system, and SWFT can contain multiple files (information about the file
as well as its binary contents). The SWFT has a standard ACPI Descriptor
Table Header, followed by SoundWire File definitions as described in
Discovery and Configuration (DisCo) Specification for SoundWire®

Link: https://github.com/acpica/acpica/commit/18c96022
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250811134505.1162661-1-mstrozek@opensource.cirrus.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-08-25 16:44:36 +02:00