Skip to content

Commit f9da23c

Browse files
committed
Merge remote-tracking branch 'linux-pm/linux-next' into sound/upstream-20250626
2 parents ee66ff9 + 3cd1e19 commit f9da23c

22 files changed

Lines changed: 656 additions & 180 deletions

File tree

Documentation/admin-guide/pm/cpufreq.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,9 @@ policy limits change after that.
398398

399399
This governor does not do anything by itself. Instead, it allows user space
400400
to set the CPU frequency for the policy it is attached to by writing to the
401-
``scaling_setspeed`` attribute of that policy.
401+
``scaling_setspeed`` attribute of that policy. Though the intention may be to
402+
set an exact frequency for the policy, the actual frequency may vary depending
403+
on hardware coordination, thermal and power limits, and other factors.
402404

403405
``schedutil``
404406
-------------

Documentation/driver-api/thermal/intel_dptf.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,15 @@ All these controls needs admin privilege to update.
206206
Update a new temperature target in milli degree celsius for hardware to
207207
use for the temperature control.
208208

209+
``thermal_tolerance`` (RW)
210+
This attribute ranges from 0 to 7, where 0 represents
211+
the most aggressive control to avoid any temperature overshoots, and
212+
7 represents a more graceful approach, favoring performance even at
213+
the expense of temperature overshoots.
214+
Note: This level may not scale linearly. For example, a value of 3 does
215+
not necessarily imply a 50% improvement in performance compared to a
216+
value of 0.
217+
209218
Given that this is platform temperature control, it is expected that a
210219
single user-level manager owns and manages the controls. If multiple
211220
user-level software applications attempt to write different targets, it

Documentation/firmware-guide/acpi/apei/einj.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ The following files belong to it:
5959
0x00000200 Platform Correctable
6060
0x00000400 Platform Uncorrectable non-fatal
6161
0x00000800 Platform Uncorrectable fatal
62+
V2_0x00000001 EINJV2 Processor Error
63+
V2_0x00000002 EINJV2 Memory Error
64+
V2_0x00000004 EINJV2 PCI Express Error
6265
================ ===================================
6366

6467
The format of the file contents are as above, except present are only
@@ -88,6 +91,8 @@ The following files belong to it:
8891
Memory address and mask valid (param1 and param2).
8992
Bit 2
9093
PCIe (seg,bus,dev,fn) valid (see param4 below).
94+
Bit 3
95+
EINJv2 extension structure is valid
9196

9297
If set to zero, legacy behavior is mimicked where the type of
9398
injection specifies just one bit set, and param1 is multiplexed.
@@ -122,6 +127,13 @@ The following files belong to it:
122127
this actually works depends on what operations the BIOS actually
123128
includes in the trigger phase.
124129

130+
- component_id0 .. component_idN, component_syndrome0 .. component_syndromeN
131+
132+
These files are used to set the "Component Array" field
133+
of the EINJv2 Extension Structure. Each holds a 128-bit
134+
hex value. Writing just a newline to any of these files
135+
sets an invalid (all-ones) value.
136+
125137
CXL error types are supported from ACPI 6.5 onwards (given a CXL port
126138
is present). The EINJ user interface for CXL error types is at
127139
<debugfs mount point>/cxl. The following files belong to it:
@@ -194,6 +206,27 @@ An error injection example::
194206
# echo 0x8 > error_type # Choose correctable memory error
195207
# echo 1 > error_inject # Inject now
196208

209+
An EINJv2 error injection example::
210+
211+
# cd /sys/kernel/debug/apei/einj
212+
# cat available_error_type # See which errors can be injected
213+
0x00000002 Processor Uncorrectable non-fatal
214+
0x00000008 Memory Correctable
215+
0x00000010 Memory Uncorrectable non-fatal
216+
V2_0x00000001 EINJV2 Processor Error
217+
V2_0x00000002 EINJV2 Memory Error
218+
219+
# echo 0x12345000 > param1 # Set memory address for injection
220+
# echo 0xfffffffffffff000 > param2 # Range - anywhere in this page
221+
# echo 0x1 > component_id0 # First device ID
222+
# echo 0x4 > component_syndrome0 # First error syndrome
223+
# echo 0x2 > component_id1 # Second device ID
224+
# echo 0x4 > component_syndrome1 # Second error syndrome
225+
# echo '' > component_id2 # Mark id2 invalid to terminate list
226+
# echo V2_0x2 > error_type # Choose EINJv2 memory error
227+
# echo 0xa > flags # set flags to indicate EINJv2
228+
# echo 1 > error_inject # Inject now
229+
197230
You should see something like this in dmesg::
198231

199232
[22715.830801] EDAC sbridge MC3: HANDLING MCE MEMORY ERROR

Documentation/power/runtime_pm.rst

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,9 @@ suspending the device are satisfied) and to queue up a suspend request for the
154154
device in that case. If there is no idle callback, or if the callback returns
155155
0, then the PM core will attempt to carry out a runtime suspend of the device,
156156
also respecting devices configured for autosuspend. In essence this means a
157-
call to pm_runtime_autosuspend() (do note that drivers needs to update the
158-
device last busy mark, pm_runtime_mark_last_busy(), to control the delay under
159-
this circumstance). To prevent this (for example, if the callback routine has
160-
started a delayed suspend), the routine must return a non-zero value. Negative
161-
error return codes are ignored by the PM core.
157+
call to pm_runtime_autosuspend(). To prevent this (for example, if the callback
158+
routine has started a delayed suspend), the routine must return a non-zero
159+
value. Negative error return codes are ignored by the PM core.
162160

163161
The helper functions provided by the PM core, described in Section 4, guarantee
164162
that the following constraints are met with respect to runtime PM callbacks for
@@ -330,10 +328,9 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
330328
'power.disable_depth' is different from 0
331329

332330
`int pm_runtime_autosuspend(struct device *dev);`
333-
- same as pm_runtime_suspend() except that the autosuspend delay is taken
334-
`into account;` if pm_runtime_autosuspend_expiration() says the delay has
335-
not yet expired then an autosuspend is scheduled for the appropriate time
336-
and 0 is returned
331+
- same as pm_runtime_suspend() except that a call to
332+
pm_runtime_mark_last_busy() is made and an autosuspend is scheduled for
333+
the appropriate time and 0 is returned
337334

338335
`int pm_runtime_resume(struct device *dev);`
339336
- execute the subsystem-level resume callback for the device; returns 0 on
@@ -357,9 +354,9 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
357354
success or error code if the request has not been queued up
358355

359356
`int pm_request_autosuspend(struct device *dev);`
360-
- schedule the execution of the subsystem-level suspend callback for the
361-
device when the autosuspend delay has expired; if the delay has already
362-
expired then the work item is queued up immediately
357+
- Call pm_runtime_mark_last_busy() and schedule the execution of the
358+
subsystem-level suspend callback for the device when the autosuspend delay
359+
expires
363360

364361
`int pm_schedule_suspend(struct device *dev, unsigned int delay);`
365362
- schedule the execution of the subsystem-level suspend callback for the
@@ -411,8 +408,9 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
411408
pm_request_idle(dev) and return its result
412409

413410
`int pm_runtime_put_autosuspend(struct device *dev);`
414-
- does the same as __pm_runtime_put_autosuspend() for now, but in the
415-
future, will also call pm_runtime_mark_last_busy() as well, DO NOT USE!
411+
- set the power.last_busy field to the current time and decrement the
412+
device's usage counter; if the result is 0 then run
413+
pm_request_autosuspend(dev) and return its result
416414

417415
`int __pm_runtime_put_autosuspend(struct device *dev);`
418416
- decrement the device's usage counter; if the result is 0 then run
@@ -427,7 +425,8 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
427425
pm_runtime_suspend(dev) and return its result
428426

429427
`int pm_runtime_put_sync_autosuspend(struct device *dev);`
430-
- decrement the device's usage counter; if the result is 0 then run
428+
- set the power.last_busy field to the current time and decrement the
429+
device's usage counter; if the result is 0 then run
431430
pm_runtime_autosuspend(dev) and return its result
432431

433432
`void pm_runtime_enable(struct device *dev);`
@@ -870,11 +869,9 @@ device is automatically suspended (the subsystem or driver still has to call
870869
the appropriate PM routines); rather it means that runtime suspends will
871870
automatically be delayed until the desired period of inactivity has elapsed.
872871

873-
Inactivity is determined based on the power.last_busy field. Drivers should
874-
call pm_runtime_mark_last_busy() to update this field after carrying out I/O,
875-
typically just before calling __pm_runtime_put_autosuspend(). The desired
876-
length of the inactivity period is a matter of policy. Subsystems can set this
877-
length initially by calling pm_runtime_set_autosuspend_delay(), but after device
872+
Inactivity is determined based on the power.last_busy field. The desired length
873+
of the inactivity period is a matter of policy. Subsystems can set this length
874+
initially by calling pm_runtime_set_autosuspend_delay(), but after device
878875
registration the length should be controlled by user space, using the
879876
/sys/devices/.../power/autosuspend_delay_ms attribute.
880877

@@ -885,12 +882,13 @@ instead of the non-autosuspend counterparts::
885882

886883
Instead of: pm_runtime_suspend use: pm_runtime_autosuspend;
887884
Instead of: pm_schedule_suspend use: pm_request_autosuspend;
888-
Instead of: pm_runtime_put use: __pm_runtime_put_autosuspend;
885+
Instead of: pm_runtime_put use: pm_runtime_put_autosuspend;
889886
Instead of: pm_runtime_put_sync use: pm_runtime_put_sync_autosuspend.
890887

891888
Drivers may also continue to use the non-autosuspend helper functions; they
892889
will behave normally, which means sometimes taking the autosuspend delay into
893-
account (see pm_runtime_idle).
890+
account (see pm_runtime_idle). The autosuspend variants of the functions also
891+
call pm_runtime_mark_last_busy().
894892

895893
Under some circumstances a driver or subsystem may want to prevent a device
896894
from autosuspending immediately, even though the usage counter is zero and the
@@ -922,12 +920,10 @@ Here is a schematic pseudo-code example::
922920
foo_io_completion(struct foo_priv *foo, void *req)
923921
{
924922
lock(&foo->private_lock);
925-
if (--foo->num_pending_requests == 0) {
926-
pm_runtime_mark_last_busy(&foo->dev);
927-
__pm_runtime_put_autosuspend(&foo->dev);
928-
} else {
923+
if (--foo->num_pending_requests == 0)
924+
pm_runtime_put_autosuspend(&foo->dev);
925+
else
929926
foo_process_next_request(foo);
930-
}
931927
unlock(&foo->private_lock);
932928
/* Send req result back to the user ... */
933929
}

drivers/acpi/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ config ACPI_TABLE_OVERRIDE_VIA_BUILTIN_INITRD
394394

395395
config ACPI_DEBUG
396396
bool "Debug Statements"
397+
default y
397398
help
398399
The ACPI subsystem can produce debug output. Saying Y enables this
399400
output and increases the kernel size by around 50K.

drivers/acpi/apei/apei-internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ static inline u32 cper_estatus_len(struct acpi_hest_generic_status *estatus)
131131

132132
int apei_osc_setup(void);
133133

134-
int einj_get_available_error_type(u32 *type);
134+
int einj_get_available_error_type(u32 *type, int einj_action);
135135
int einj_error_inject(u32 type, u32 flags, u64 param1, u64 param2, u64 param3,
136136
u64 param4);
137137
int einj_cxl_rch_error_inject(u32 type, u32 flags, u64 param1, u64 param2,

0 commit comments

Comments
 (0)