Skip to content

Commit 2e31b16

Browse files
committed
Merge tag 'acpi-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI support updates from Rafael Wysocki: "These include an update of the CMOS RTC driver and the related ACPI and x86 code that, among other things, switches it over to using the platform device interface for device binding on x86 instead of the PNP device driver interface (which allows the code in question to be simplified quite a bit), a major update of the ACPI Time and Alarm Device (TAD) driver adding an RTC class device interface to it, and updates of core ACPI drivers that remove some unnecessary and not really useful code from them. Apart from that, two drivers are converted to using the platform driver interface for device binding instead of the ACPI driver one, which is slated for removal, support for the Performance Limited register is added to the ACPI CPPC library and there are some janitorial updates of it and the related cpufreq CPPC driver, the ACPI processor driver is fixed and cleaned up, and NVIDIA vendor CPER record handler is added to the APEI GHES code. Also, the interface for obtaining a CPU UID from ACPI is consolidated across architectures and used for fixing a problem with the PCI TPH Steering Tag on ARM64, there are two updates related to ACPICA, a minor ACPI OS Services Layer (OSL) update, and a few assorted updates related to ACPI tables parsing. Specifics: - Update maintainers information regarding ACPICA (Rafael Wysocki) - Replace strncpy() with strscpy_pad() in acpi_ut_safe_strncpy() (Kees Cook) - Trigger an ordered system power off after encountering a fatal error operator in AML (Armin Wolf) - Enable ACPI FPDT parsing on LoongArch (Xi Ruoyao) - Remove the temporary stop-gap acpi_pptt_cache_v1_full structure from the ACPI PPTT parser (Ben Horgan) - Add support for exposing ACPI FPDT subtables FBPT and S3PT (Nate DeSimone) - Address multiple assorted issues and clean up the code in the ACPI processor idle driver (Huisong Li) - Replace strlcat() in the ACPI processor idle drive with a better alternative (Andy Shevchenko) - Rearrange and clean up acpi_processor_errata_piix4() (Rafael Wysocki) - Move reference performance to capabilities and fix an uninitialized variable in the ACPI CPPC library (Pengjie Zhang) - Add support for the Performance Limited Register to the ACPI CPPC library (Sumit Gupta) - Add cppc_get_perf() API to read performance controls, extend cppc_set_epp_perf() for FFH/SystemMemory, and make the ACPI CPPC library warn on missing mandatory DESIRED_PERF register (Sumit Gupta) - Modify the cpufreq CPPC driver to update MIN_PERF/MAX_PERF in target callbacks to allow it to control performance bounds via standard scaling_min_freq and scaling_max_freq sysfs attributes and add sysfs documentation for the Performance Limited Register to it (Sumit Gupta) - Add ACPI support to the platform device interface in the CMOS RTC driver, make the ACPI core device enumeration code create a platform device for the CMOS RTC, and drop CMOS RTC PNP device support (Rafael Wysocki) - Consolidate the x86-specific CMOS RTC handling with the ACPI TAD driver and clean up the CMOS RTC ACPI address space handler (Rafael Wysocki) - Enable ACPI alarm in the CMOS RTC driver if advertised in ACPI FADT and allow that driver to work without a dedicated IRQ if the ACPI alarm is used (Rafael Wysocki) - Clean up the ACPI TAD driver in various ways and add an RTC class device interface, including both the RTC setting/reading and alarm timer support, to it (Rafael Wysocki) - Clean up the ACPI AC and ACPI PAD (processor aggregator device) drivers (Rafael Wysocki) - Rework checking for duplicate video bus devices and consolidate pnp.bus_id workarounds handling in the ACPI video bus driver (Rafael Wysocki) - Update the ACPI core device drivers to stop setting acpi_device_name() unnecessarily (Rafael Wysocki) - Rearrange code using acpi_device_class() in the ACPI core device drivers and update them to stop setting acpi_device_class() unnecessarily (Rafael Wysocki) - Define ACPI_AC_CLASS in one place (Rafael Wysocki) - Convert the ni903x_wdt watchdog driver and the xen ACPI PAD driver to bind to platform devices instead of ACPI devices (Rafael Wysocki) - Add devm_ghes_register_vendor_record_notifier(), use it in the PCI hisi driver, and Add NVIDIA vendor CPER record handler (Kai-Heng Feng) - Consolidate the interface for obtaining a CPU UID from ACPI across architectures and use it to address incorrect PCI TPH Steering Tag on ARM64 resulting from the invalid assumption that the ACPI Processor UID would always be the same as the corresponding logical CPU ID in Linux (Chengwen Feng)" * tag 'acpi-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (73 commits) ACPICA: Update maintainers information watchdog: ni903x_wdt: Convert to a platform driver ACPI: PAD: xen: Convert to a platform driver ACPI: processor: idle: Reset cpuidle on C-state list changes cpuidle: Extract and export no-lock variants of cpuidle_unregister_device() PCI/TPH: Pass ACPI Processor UID to Cache Locality _DSM ACPI: PPTT: Use acpi_get_cpu_uid() and remove get_acpi_id_for_cpu() perf: arm_cspmu: Switch to acpi_get_cpu_uid() from get_acpi_id_for_cpu() ACPI: Centralize acpi_get_cpu_uid() declaration in include/linux/acpi.h x86/acpi: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval RISC-V: ACPI: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval LoongArch: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval arm64: acpi: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval ACPI: APEI: GHES: Add NVIDIA vendor CPER record handler PCI: hisi: Use devm_ghes_register_vendor_record_notifier() ACPI: APEI: GHES: Add devm_ghes_register_vendor_record_notifier() ACPI: tables: Enable FPDT on LoongArch ACPI: processor: idle: Fix NULL pointer dereference in hotplug path ACPI: processor: idle: Reset power_setup_done flag on initialization failure ACPI: TAD: Add alarm support to the RTC class device interface ...
2 parents 4793dae + 8e93786 commit 2e31b16

69 files changed

Lines changed: 1450 additions & 766 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/ABI/testing/sysfs-devices-system-cpu

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,24 @@ Description: Energy performance preference
327327

328328
This file is only present if the cppc-cpufreq driver is in use.
329329

330+
What: /sys/devices/system/cpu/cpuX/cpufreq/perf_limited
331+
Date: February 2026
332+
Contact: linux-pm@vger.kernel.org
333+
Description: Performance Limited
334+
335+
Read to check if platform throttling (thermal/power/current
336+
limits) caused delivered performance to fall below the
337+
requested level. A non-zero value indicates throttling occurred.
338+
339+
Write the bitmask of bits to clear:
340+
341+
- 0x1 = clear bit 0 (desired performance excursion)
342+
- 0x2 = clear bit 1 (minimum performance excursion)
343+
- 0x3 = clear both bits
344+
345+
The platform sets these bits; OSPM can only clear them.
346+
347+
This file is only present if the cppc-cpufreq driver is in use.
330348

331349
What: /sys/devices/system/cpu/cpu*/cache/index3/cache_disable_{0,1}
332350
Date: August 2008

Documentation/ABI/testing/sysfs-firmware-acpi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ Description:
4141
platform runtime firmware S3 resume, just prior to
4242
handoff to the OS waking vector. In nanoseconds.
4343

44+
FBPT: The raw binary contents of the Firmware Basic Boot
45+
Performance Table (FBPT) subtable.
46+
47+
S3PT: The raw binary contents of the S3 Performance Table
48+
(S3PT) subtable.
49+
4450
What: /sys/firmware/acpi/bgrt/
4551
Date: January 2012
4652
Contact: Matthew Garrett <mjg@redhat.com>

Documentation/PCI/tph.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ To retrieve a Steering Tag for a target memory associated with a specific
7979
CPU, use the following function::
8080

8181
int pcie_tph_get_cpu_st(struct pci_dev *pdev, enum tph_mem_type type,
82-
unsigned int cpu_uid, u16 *tag);
82+
unsigned int cpu, u16 *tag);
8383

8484
The `type` argument is used to specify the memory type, either volatile
85-
or persistent, of the target memory. The `cpu_uid` argument specifies the
85+
or persistent, of the target memory. The `cpu` argument specifies the
8686
CPU where the memory is associated to.
8787

8888
After the ST value is retrieved, the device driver can use the following

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,14 @@ Kernel parameters
190190
unusable. The "log_buf_len" parameter may be useful
191191
if you need to capture more output.
192192

193+
acpi.poweroff_on_fatal= [ACPI]
194+
{0 | 1}
195+
Causes the system to poweroff when the ACPI bytecode signals
196+
a fatal error. The default value of this setting is 1.
197+
Overriding this value should only be done for diagnosing
198+
ACPI firmware problems, as the system might behave erratically
199+
after having encountered a fatal ACPI error.
200+
193201
acpi_enforce_resources= [ACPI]
194202
{ strict | lax | no }
195203
Check for resource conflicts between native drivers

MAINTAINERS

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ F: drivers/firmware/efi/cper*
318318

319319
ACPI COMPONENT ARCHITECTURE (ACPICA)
320320
M: "Rafael J. Wysocki" <rafael@kernel.org>
321-
M: Robert Moore <robert.moore@intel.com>
321+
M: Saket Dumbre <saket.dumbre@intel.com>
322322
L: linux-acpi@vger.kernel.org
323323
L: acpica-devel@lists.linux.dev
324324
S: Supported
@@ -18923,6 +18923,12 @@ S: Maintained
1892318923
F: drivers/video/fbdev/nvidia/
1892418924
F: drivers/video/fbdev/riva/
1892518925

18926+
NVIDIA GHES VENDOR CPER RECORD HANDLER
18927+
M: Kai-Heng Feng <kaihengf@nvidia.com>
18928+
L: linux-acpi@vger.kernel.org
18929+
S: Maintained
18930+
F: drivers/acpi/apei/nvidia-ghes.c
18931+
1892618932
NVIDIA VRS RTC DRIVER
1892718933
M: Shubhi Garg <shgarg@nvidia.com>
1892818934
L: linux-tegra@vger.kernel.org

arch/arm64/include/asm/acpi.h

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -114,22 +114,7 @@ static inline bool acpi_has_cpu_in_madt(void)
114114
}
115115

116116
struct acpi_madt_generic_interrupt *acpi_cpu_get_madt_gicc(int cpu);
117-
static inline u32 get_acpi_id_for_cpu(unsigned int cpu)
118-
{
119-
return acpi_cpu_get_madt_gicc(cpu)->uid;
120-
}
121-
122-
static inline int get_cpu_for_acpi_id(u32 uid)
123-
{
124-
int cpu;
125-
126-
for (cpu = 0; cpu < nr_cpu_ids; cpu++)
127-
if (acpi_cpu_get_madt_gicc(cpu) &&
128-
uid == get_acpi_id_for_cpu(cpu))
129-
return cpu;
130-
131-
return -EINVAL;
132-
}
117+
int get_cpu_for_acpi_id(u32 uid);
133118

134119
static inline void arch_fix_phys_package_id(int num, u32 slot) { }
135120
void __init acpi_init_cpus(void);

arch/arm64/kernel/acpi.c

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,3 +458,33 @@ int acpi_unmap_cpu(int cpu)
458458
}
459459
EXPORT_SYMBOL(acpi_unmap_cpu);
460460
#endif /* CONFIG_ACPI_HOTPLUG_CPU */
461+
462+
int acpi_get_cpu_uid(unsigned int cpu, u32 *uid)
463+
{
464+
struct acpi_madt_generic_interrupt *gicc;
465+
466+
if (cpu >= nr_cpu_ids)
467+
return -EINVAL;
468+
469+
gicc = acpi_cpu_get_madt_gicc(cpu);
470+
if (!gicc)
471+
return -ENODEV;
472+
473+
*uid = gicc->uid;
474+
return 0;
475+
}
476+
EXPORT_SYMBOL_GPL(acpi_get_cpu_uid);
477+
478+
int get_cpu_for_acpi_id(u32 uid)
479+
{
480+
u32 cpu_uid;
481+
int ret;
482+
483+
for (int cpu = 0; cpu < nr_cpu_ids; cpu++) {
484+
ret = acpi_get_cpu_uid(cpu, &cpu_uid);
485+
if (ret == 0 && uid == cpu_uid)
486+
return cpu;
487+
}
488+
489+
return -EINVAL;
490+
}

arch/loongarch/include/asm/acpi.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ extern struct acpi_madt_core_pic acpi_core_pic[MAX_CORE_PIC];
4040

4141
extern int __init parse_acpi_topology(void);
4242

43-
static inline u32 get_acpi_id_for_cpu(unsigned int cpu)
44-
{
45-
return acpi_core_pic[cpu_logical_map(cpu)].processor_id;
46-
}
47-
4843
#endif /* !CONFIG_ACPI */
4944

5045
#define ACPI_TABLE_UPGRADE_MAX_PHYS ARCH_LOW_ADDRESS_LIMIT

arch/loongarch/kernel/acpi.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,3 +385,12 @@ int acpi_unmap_cpu(int cpu)
385385
EXPORT_SYMBOL(acpi_unmap_cpu);
386386

387387
#endif /* CONFIG_ACPI_HOTPLUG_CPU */
388+
389+
int acpi_get_cpu_uid(unsigned int cpu, u32 *uid)
390+
{
391+
if (cpu >= nr_cpu_ids)
392+
return -EINVAL;
393+
*uid = acpi_core_pic[cpu_logical_map(cpu)].processor_id;
394+
return 0;
395+
}
396+
EXPORT_SYMBOL_GPL(acpi_get_cpu_uid);

arch/riscv/include/asm/acpi.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@ static inline void arch_fix_phys_package_id(int num, u32 slot) { }
6161

6262
void acpi_init_rintc_map(void);
6363
struct acpi_madt_rintc *acpi_cpu_get_madt_rintc(int cpu);
64-
static inline u32 get_acpi_id_for_cpu(int cpu)
65-
{
66-
return acpi_cpu_get_madt_rintc(cpu)->uid;
67-
}
6864

6965
int acpi_get_riscv_isa(struct acpi_table_header *table,
7066
unsigned int cpu, const char **isa);

0 commit comments

Comments
 (0)