Skip to content

Commit bfb0315

Browse files
committed
Merge branches 'acpi-processor' and 'acpi-cppc'
Merge ACPI processor driver updates and ACPI CPPC library updates for 7.1-rc1: - 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) * acpi-processor: ACPI: processor: idle: Reset cpuidle on C-state list changes cpuidle: Extract and export no-lock variants of cpuidle_unregister_device() ACPI: processor: idle: Fix NULL pointer dereference in hotplug path ACPI: processor: idle: Reset power_setup_done flag on initialization failure ACPI: processor: Rearrange and clean up acpi_processor_errata_piix4() ACPI: processor: idle: Replace strlcat() with better alternative ACPI: processor: idle: Remove redundant static variable and rename cstate check function ACPI: processor: idle: Move max_cstate update out of the loop ACPI: processor: idle: Remove redundant cstate check in acpi_processor_power_init ACPI: processor: idle: Add missing bounds check in flatten_lpi_states() * acpi-cppc: ACPI: CPPC: Check cpc_read() return values consistently ACPI: CPPC: Fix uninitialized ref variable in cppc_get_perf_caps() ACPI: CPPC: Move reference performance to capabilities cpufreq: CPPC: Add sysfs documentation for perf_limited ACPI: CPPC: add APIs and sysfs interface for perf_limited cpufreq: cppc: Update MIN_PERF/MAX_PERF in target callbacks cpufreq: CPPC: Update cached perf_ctrls on sysfs write ACPI: CPPC: Extend cppc_set_epp_perf() for FFH/SystemMemory ACPI: CPPC: Warn on missing mandatory DESIRED_PERF register ACPI: CPPC: Add cppc_get_perf() API to read performance controls
3 parents 8e2308c + 07cba0d + 0cc2497 commit bfb0315

8 files changed

Lines changed: 453 additions & 119 deletions

File tree

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

drivers/acpi/acpi_processor.c

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ acpi_handle acpi_get_processor_handle(int cpu)
4848

4949
static int acpi_processor_errata_piix4(struct pci_dev *dev)
5050
{
51-
u8 value1 = 0;
52-
u8 value2 = 0;
53-
struct pci_dev *ide_dev = NULL, *isa_dev = NULL;
54-
55-
5651
if (!dev)
5752
return -EINVAL;
5853

@@ -108,16 +103,16 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev)
108103
* each IDE controller's DMA status to make sure we catch all
109104
* DMA activity.
110105
*/
111-
ide_dev = pci_get_subsys(PCI_VENDOR_ID_INTEL,
106+
dev = pci_get_subsys(PCI_VENDOR_ID_INTEL,
112107
PCI_DEVICE_ID_INTEL_82371AB,
113108
PCI_ANY_ID, PCI_ANY_ID, NULL);
114-
if (ide_dev) {
115-
errata.piix4.bmisx = pci_resource_start(ide_dev, 4);
109+
if (dev) {
110+
errata.piix4.bmisx = pci_resource_start(dev, 4);
116111
if (errata.piix4.bmisx)
117-
dev_dbg(&ide_dev->dev,
112+
dev_dbg(&dev->dev,
118113
"Bus master activity detection (BM-IDE) erratum enabled\n");
119114

120-
pci_dev_put(ide_dev);
115+
pci_dev_put(dev);
121116
}
122117

123118
/*
@@ -129,18 +124,20 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev)
129124
* disable C3 support if this is enabled, as some legacy
130125
* devices won't operate well if fast DMA is disabled.
131126
*/
132-
isa_dev = pci_get_subsys(PCI_VENDOR_ID_INTEL,
127+
dev = pci_get_subsys(PCI_VENDOR_ID_INTEL,
133128
PCI_DEVICE_ID_INTEL_82371AB_0,
134129
PCI_ANY_ID, PCI_ANY_ID, NULL);
135-
if (isa_dev) {
136-
pci_read_config_byte(isa_dev, 0x76, &value1);
137-
pci_read_config_byte(isa_dev, 0x77, &value2);
130+
if (dev) {
131+
u8 value1 = 0, value2 = 0;
132+
133+
pci_read_config_byte(dev, 0x76, &value1);
134+
pci_read_config_byte(dev, 0x77, &value2);
138135
if ((value1 & 0x80) || (value2 & 0x80)) {
139136
errata.piix4.fdma = 1;
140-
dev_dbg(&isa_dev->dev,
137+
dev_dbg(&dev->dev,
141138
"Type-F DMA livelock erratum (C3 disabled)\n");
142139
}
143-
pci_dev_put(isa_dev);
140+
pci_dev_put(dev);
144141
}
145142

146143
break;

0 commit comments

Comments
 (0)