Skip to content

Commit 29e7726

Browse files
committed
Merge remote-tracking branch 'linux-pm/linux-next' into sound/upstream-20250523
2 parents 3b6d962 + 9ea94d5 commit 29e7726

297 files changed

Lines changed: 7337 additions & 1195 deletions

File tree

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: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ What: /sys/devices/system/cpu/cpuidle/available_governors
111111
/sys/devices/system/cpu/cpuidle/current_driver
112112
/sys/devices/system/cpu/cpuidle/current_governor
113113
/sys/devices/system/cpu/cpuidle/current_governer_ro
114+
/sys/devices/system/cpu/cpuidle/intel_c1_demotion
114115
Date: September 2007
115116
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
116117
Description: Discover cpuidle policy and mechanism
@@ -132,7 +133,11 @@ Description: Discover cpuidle policy and mechanism
132133

133134
current_governor_ro: (RO) displays current idle policy.
134135

135-
See Documentation/admin-guide/pm/cpuidle.rst and
136+
intel_c1_demotion: (RW) enables/disables the C1 demotion
137+
feature on Intel CPUs.
138+
139+
See Documentation/admin-guide/pm/cpuidle.rst,
140+
Documentation/admin-guide/pm/intel_idle.rst, and
136141
Documentation/driver-api/pm/cpuidle.rst for more information.
137142

138143

@@ -268,6 +273,60 @@ Description: Discover CPUs in the same CPU frequency coordination domain
268273
This file is only present if the acpi-cpufreq or the cppc-cpufreq
269274
drivers are in use.
270275

276+
What: /sys/devices/system/cpu/cpuX/cpufreq/auto_select
277+
Date: May 2025
278+
Contact: linux-pm@vger.kernel.org
279+
Description: Autonomous selection enable
280+
281+
Read/write interface to control autonomous selection enable
282+
Read returns autonomous selection status:
283+
0: autonomous selection is disabled
284+
1: autonomous selection is enabled
285+
286+
Write 'y' or '1' or 'on' to enable autonomous selection.
287+
Write 'n' or '0' or 'off' to disable autonomous selection.
288+
289+
This file is only present if the cppc-cpufreq driver is in use.
290+
291+
What: /sys/devices/system/cpu/cpuX/cpufreq/auto_act_window
292+
Date: May 2025
293+
Contact: linux-pm@vger.kernel.org
294+
Description: Autonomous activity window
295+
296+
This file indicates a moving utilization sensitivity window to
297+
the platform's autonomous selection policy.
298+
299+
Read/write an integer represents autonomous activity window (in
300+
microseconds) from/to this file. The max value to write is
301+
1270000000 but the max significand is 127. This means that if 128
302+
is written to this file, 127 will be stored. If the value is
303+
greater than 130, only the first two digits will be saved as
304+
significand.
305+
306+
Writing a zero value to this file enable the platform to
307+
determine an appropriate Activity Window depending on the workload.
308+
309+
Writing to this file only has meaning when Autonomous Selection is
310+
enabled.
311+
312+
This file is only present if the cppc-cpufreq driver is in use.
313+
314+
What: /sys/devices/system/cpu/cpuX/cpufreq/energy_performance_preference_val
315+
Date: May 2025
316+
Contact: linux-pm@vger.kernel.org
317+
Description: Energy performance preference
318+
319+
Read/write an 8-bit integer from/to this file. This file
320+
represents a range of values from 0 (performance preference) to
321+
0xFF (energy efficiency preference) that influences the rate of
322+
performance increase/decrease and the result of the hardware's
323+
energy efficiency and performance optimization policies.
324+
325+
Writing to this file only has meaning when Autonomous Selection is
326+
enabled.
327+
328+
This file is only present if the cppc-cpufreq driver is in use.
329+
271330

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

Documentation/ABI/testing/sysfs-firmware-acpi

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,3 +248,24 @@ Description:
248248
# cat ff_pwr_btn
249249
7 enabled
250250

251+
What: /sys/firmware/acpi/memory_ranges/rangeX
252+
Date: February 2025
253+
Contact: Tony Luck <tony.luck@intel.com>
254+
Description:
255+
On systems with the ACPI MRRM table reports the parameters for
256+
each range.
257+
258+
base: Starting system physical address.
259+
260+
length: Length of this range in bytes.
261+
262+
node: NUMA node that this range belongs to. Negative numbers
263+
indicate that the node number could not be determined (e.g
264+
for an address range that is reserved for future hot add of
265+
memory).
266+
267+
local_region_id: ID associated with access by agents
268+
local to this range of addresses.
269+
270+
remote_region_id: ID associated with access by agents
271+
non-local to this range of addresses.

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1828,6 +1828,13 @@
18281828
lz4: Select LZ4 compression algorithm to
18291829
compress/decompress hibernation image.
18301830

1831+
hibernate.pm_test_delay=
1832+
[HIBERNATION]
1833+
Sets the number of seconds to remain in a hibernation test
1834+
mode before resuming the system (see
1835+
/sys/power/pm_test). Only available when CONFIG_PM_DEBUG
1836+
is set. Default value is 5.
1837+
18311838
highmem=nn[KMG] [KNL,BOOT,EARLY] forces the highmem zone to have an exact
18321839
size of <nn>. This works even on boxes that have no
18331840
highmem otherwise. This also works to reduce highmem

Documentation/admin-guide/pm/intel_idle.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,27 @@ instruction at all.
3838
only way to pass early-configuration-time parameters to it is via the kernel
3939
command line.
4040

41+
Sysfs Interface
42+
===============
43+
44+
The ``intel_idle`` driver exposes the following ``sysfs`` attributes in
45+
``/sys/devices/system/cpu/cpuidle/``:
46+
47+
``intel_c1_demotion``
48+
Enable or disable C1 demotion for all CPUs in the system. This file is
49+
only exposed on platforms that support the C1 demotion feature and where
50+
it was tested. Value 0 means that C1 demotion is disabled, value 1 means
51+
that it is enabled. Write 0 or 1 to disable or enable C1 demotion for
52+
all CPUs.
53+
54+
The C1 demotion feature involves the platform firmware demoting deep
55+
C-state requests from the OS (e.g., C6 requests) to C1. The idea is that
56+
firmware monitors CPU wake-up rate, and if it is higher than a
57+
platform-specific threshold, the firmware demotes deep C-state requests
58+
to C1. For example, Linux requests C6, but firmware noticed too many
59+
wake-ups per second, and it keeps the CPU in C1. When the CPU stays in
60+
C1 long enough, the platform promotes it back to C6. This may improve
61+
some workloads' performance, but it may also increase power consumption.
4162

4263
.. _intel-idle-enumeration-of-states:
4364

Documentation/admin-guide/pm/intel_pstate.rst

Lines changed: 102 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,106 @@ information listed above is the same for all of the processors supporting the
329329
HWP feature, which is why ``intel_pstate`` works with all of them.]
330330

331331

332+
Support for Hybrid Processors
333+
=============================
334+
335+
Some processors supported by ``intel_pstate`` contain two or more types of CPU
336+
cores differing by the maximum turbo P-state, performance vs power characteristics,
337+
cache sizes, and possibly other properties. They are commonly referred to as
338+
hybrid processors. To support them, ``intel_pstate`` requires HWP to be enabled
339+
and it assumes the HWP performance units to be the same for all CPUs in the
340+
system, so a given HWP performance level always represents approximately the
341+
same physical performance regardless of the core (CPU) type.
342+
343+
Hybrid Processors with SMT
344+
--------------------------
345+
346+
On systems where SMT (Simultaneous Multithreading), also referred to as
347+
HyperThreading (HT) in the context of Intel processors, is enabled on at least
348+
one core, ``intel_pstate`` assigns performance-based priorities to CPUs. Namely,
349+
the priority of a given CPU reflects its highest HWP performance level which
350+
causes the CPU scheduler to generally prefer more performant CPUs, so the less
351+
performant CPUs are used when the other ones are fully loaded. However, SMT
352+
siblings (that is, logical CPUs sharing one physical core) are treated in a
353+
special way such that if one of them is in use, the effective priority of the
354+
other ones is lowered below the priorities of the CPUs located in the other
355+
physical cores.
356+
357+
This approach maximizes performance in the majority of cases, but unfortunately
358+
it also leads to excessive energy usage in some important scenarios, like video
359+
playback, which is not generally desirable. While there is no other viable
360+
choice with SMT enabled because the effective capacity and utilization of SMT
361+
siblings are hard to determine, hybrid processors without SMT can be handled in
362+
more energy-efficient ways.
363+
364+
.. _CAS:
365+
366+
Capacity-Aware Scheduling Support
367+
---------------------------------
368+
369+
The capacity-aware scheduling (CAS) support in the CPU scheduler is enabled by
370+
``intel_pstate`` by default on hybrid processors without SMT. CAS generally
371+
causes the scheduler to put tasks on a CPU so long as there is a sufficient
372+
amount of spare capacity on it, and if the utilization of a given task is too
373+
high for it, the task will need to go somewhere else.
374+
375+
Since CAS takes CPU capacities into account, it does not require CPU
376+
prioritization and it allows tasks to be distributed more symmetrically among
377+
the more performant and less performant CPUs. Once placed on a CPU with enough
378+
capacity to accommodate it, a task may just continue to run there regardless of
379+
whether or not the other CPUs are fully loaded, so on average CAS reduces the
380+
utilization of the more performant CPUs which causes the energy usage to be more
381+
balanced because the more performant CPUs are generally less energy-efficient
382+
than the less performant ones.
383+
384+
In order to use CAS, the scheduler needs to know the capacity of each CPU in
385+
the system and it needs to be able to compute scale-invariant utilization of
386+
CPUs, so ``intel_pstate`` provides it with the requisite information.
387+
388+
First of all, the capacity of each CPU is represented by the ratio of its highest
389+
HWP performance level, multiplied by 1024, to the highest HWP performance level
390+
of the most performant CPU in the system, which works because the HWP performance
391+
units are the same for all CPUs. Second, the frequency-invariance computations,
392+
carried out by the scheduler to always express CPU utilization in the same units
393+
regardless of the frequency it is currently running at, are adjusted to take the
394+
CPU capacity into account. All of this happens when ``intel_pstate`` has
395+
registered itself with the ``CPUFreq`` core and it has figured out that it is
396+
running on a hybrid processor without SMT.
397+
398+
Energy-Aware Scheduling Support
399+
-------------------------------
400+
401+
If ``CONFIG_ENERGY_MODEL`` has been set during kernel configuration and
402+
``intel_pstate`` runs on a hybrid processor without SMT, in addition to enabling
403+
`CAS <CAS_>`_ it registers an Energy Model for the processor. This allows the
404+
Energy-Aware Scheduling (EAS) support to be enabled in the CPU scheduler if
405+
``schedutil`` is used as the ``CPUFreq`` governor which requires ``intel_pstate``
406+
to operate in the `passive mode <Passive Mode_>`_.
407+
408+
The Energy Model registered by ``intel_pstate`` is artificial (that is, it is
409+
based on abstract cost values and it does not include any real power numbers)
410+
and it is relatively simple to avoid unnecessary computations in the scheduler.
411+
There is a performance domain in it for every CPU in the system and the cost
412+
values for these performance domains have been chosen so that running a task on
413+
a less performant (small) CPU appears to be always cheaper than running that
414+
task on a more performant (big) CPU. However, for two CPUs of the same type,
415+
the cost difference depends on their current utilization, and the CPU whose
416+
current utilization is higher generally appears to be a more expensive
417+
destination for a given task. This helps to balance the load among CPUs of the
418+
same type.
419+
420+
Since EAS works on top of CAS, high-utilization tasks are always migrated to
421+
CPUs with enough capacity to accommodate them, but thanks to EAS, low-utilization
422+
tasks tend to be placed on the CPUs that look less expensive to the scheduler.
423+
Effectively, this causes the less performant and less loaded CPUs to be
424+
preferred as long as they have enough spare capacity to run the given task
425+
which generally leads to reduced energy usage.
426+
427+
The Energy Model created by ``intel_pstate`` can be inspected by looking at
428+
the ``energy_model`` directory in ``debugfs`` (typlically mounted on
429+
``/sys/kernel/debug/``).
430+
431+
332432
User Space Interface in ``sysfs``
333433
=================================
334434

@@ -697,8 +797,8 @@ of them have to be prepended with the ``intel_pstate=`` prefix.
697797
Limits`_ for details).
698798

699799
``no_cas``
700-
Do not enable capacity-aware scheduling (CAS) which is enabled by
701-
default on hybrid systems.
800+
Do not enable `capacity-aware scheduling <CAS_>`_ which is enabled by
801+
default on hybrid systems without SMT.
702802

703803
Diagnostics and Tuning
704804
======================

Documentation/core-api/printk-formats.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,9 +571,8 @@ struct clk
571571
::
572572

573573
%pC pll1
574-
%pCn pll1
575574

576-
For printing struct clk structures. %pC and %pCn print the name of the clock
575+
For printing struct clk structures. %pC prints the name of the clock
577576
(Common Clock Framework) or a unique 32-bit ID (legacy clock framework).
578577

579578
Passed by reference.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/thermal/airoha,en7581-thermal.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Airoha EN7581 Thermal Sensor and Monitor
8+
9+
maintainers:
10+
- Christian Marangi <ansuelsmth@gmail.com>
11+
12+
properties:
13+
compatible:
14+
const: airoha,en7581-thermal
15+
16+
reg:
17+
maxItems: 1
18+
19+
interrupts:
20+
maxItems: 1
21+
22+
airoha,chip-scu:
23+
description: phandle to the chip SCU syscon
24+
$ref: /schemas/types.yaml#/definitions/phandle
25+
26+
'#thermal-sensor-cells':
27+
const: 0
28+
29+
required:
30+
- compatible
31+
- reg
32+
- interrupts
33+
- airoha,chip-scu
34+
35+
additionalProperties: false
36+
37+
examples:
38+
- |
39+
#include <dt-bindings/interrupt-controller/arm-gic.h>
40+
41+
thermal-sensor@1efbd800 {
42+
compatible = "airoha,en7581-thermal";
43+
reg = <0x1efbd000 0xd5c>;
44+
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
45+
airoha,chip-scu = <&chip_scu>;
46+
47+
#thermal-sensor-cells = <0>;
48+
};

Documentation/devicetree/bindings/thermal/qcom-tsens.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ properties:
3939
- description: v1 of TSENS
4040
items:
4141
- enum:
42+
- qcom,ipq5018-tsens
4243
- qcom,msm8937-tsens
4344
- qcom,msm8956-tsens
4445
- qcom,msm8976-tsens
@@ -251,6 +252,7 @@ allOf:
251252
compatible:
252253
contains:
253254
enum:
255+
- qcom,ipq5018-tsens
254256
- qcom,ipq8064-tsens
255257
- qcom,msm8960-tsens
256258
- qcom,tsens-v0_1

Documentation/driver-api/thermal/intel_dptf.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,27 @@ ABI.
191191
User space can specify any one of the available workload type using
192192
this interface.
193193

194+
:file:`/sys/bus/pci/devices/0000\:00\:04.0/ptc_0_control`
195+
:file:`/sys/bus/pci/devices/0000\:00\:04.0/ptc_1_control`
196+
:file:`/sys/bus/pci/devices/0000\:00\:04.0/ptc_2_control`
197+
198+
All these controls needs admin privilege to update.
199+
200+
``enable`` (RW)
201+
1 for enable, 0 for disable. Shows the current enable status of
202+
platform temperature control feature. User space can enable/disable
203+
hardware controls.
204+
205+
``temperature_target`` (RW)
206+
Update a new temperature target in milli degree celsius for hardware to
207+
use for the temperature control.
208+
209+
Given that this is platform temperature control, it is expected that a
210+
single user-level manager owns and manages the controls. If multiple
211+
user-level software applications attempt to write different targets, it
212+
can lead to unexpected behavior.
213+
214+
194215
DPTF Processor thermal RFIM interface
195216
--------------------------------------------
196217

0 commit comments

Comments
 (0)