2023-07-20 08:09:17 |
You-Sheng Yang |
description |
Upstream bugzilla https://bugzilla.kernel.org/show_bug.cgi?id=217571
This is specifically when a system advertises support for PMF, but doesn't support static power slider for any reason.
Upstream fix in https://github.com/torvalds/linux/commit/146b6f6855e7656e8329910606595220c761daac, which has been backported to v6.1.36 (oem-6.1 in v6.1.34 now), v6.2.15 (linux/lunar in v6.2.13), v6.3.10 (linux/mantic in v6.3.8), v6.4. |
[SRU Justification]
BugLink: https://bugs.launchpad.net/bugs/2025670
[Impact]
Call trace dumped in events workqueue power_supply_changed_work, and cpufreq locked to 400-544MHz.
```
[ 22.592162] Call Trace:
[ 22.592164] <TASK>
[ 22.592164] ? rcu_note_context_switch+0x5e0/0x660
[ 22.592166] ? __warn+0x81/0x130
[ 22.592171] ? rcu_note_context_switch+0x5e0/0x660
[ 22.592172] ? report_bug+0x171/0x1a0
[ 22.592175] ? prb_read_valid+0x1b/0x30
[ 22.592177] ? handle_bug+0x3c/0x80
[ 22.592178] ? exc_invalid_op+0x17/0x70
[ 22.592179] ? asm_exc_invalid_op+0x1a/0x20
[ 22.592182] ? rcu_note_context_switch+0x5e0/0x660
[ 22.592183] ? acpi_ut_delete_object_desc+0x86/0xb0
[ 22.592186] ? acpi_ut_update_ref_count.part.0+0x22d/0x930
[ 22.592187] __schedule+0xc0/0x1410
[ 22.592189] ? ktime_get+0x3c/0xa0
[ 22.592191] ? lapic_next_event+0x1d/0x30
[ 22.592193] ? hrtimer_start_range_ns+0x25b/0x350
[ 22.592196] schedule+0x5e/0xd0
[ 22.592197] schedule_hrtimeout_range_clock+0xbe/0x140
[ 22.592199] ? __pfx_hrtimer_wakeup+0x10/0x10
[ 22.592200] usleep_range_state+0x64/0x90
[ 22.592203] amd_pmf_send_cmd+0x106/0x2a0 [amd_pmf bddfe0fe3712aaa99acce3d5487405c5213c6616]
[ 22.592207] amd_pmf_update_slider+0x56/0x1b0 [amd_pmf bddfe0fe3712aaa99acce3d5487405c5213c6616]
[ 22.592210] amd_pmf_set_sps_power_limits+0x72/0x80 [amd_pmf bddfe0fe3712aaa99acce3d5487405c5213c6616]
[ 22.592213] amd_pmf_pwr_src_notify_call+0x49/0x90 [amd_pmf bddfe0fe3712aaa99acce3d5487405c5213c6616]
[ 22.592216] notifier_call_chain+0x5a/0xd0
[ 22.592218] atomic_notifier_call_chain+0x32/0x50
```
[Fix]
Upstream v6.4 fixed with commit [146b6f6855e76](https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?h=fixes&id=146b6f6855e7656e8329910606595220c761daac) ("platform/x86/amd/pmf: Register notify handler only if SPS is enabled"). It has also been backported to stable trees v6.1.36 (oem-6.1 in v6.1.34 now), v6.2.15 (linux/lunar in v6.2.13 now), v6.3.10 (linux/mantic in v6.3.8 now).
[Test Case]
1. boot with AC power cable connected
2. unplug power cable and check cpufreq
3. check no call trace found in dmesg
[Where problems could occur]
This patch installs only notify handler when the feature is fully supported, so it's the right behavior.
[Other Info]
While we should receive this fix from stable fixes soon, nominate only oem-6.1 to allow rolling out fix as soon as possible.
========== original bug description ==========
Upstream bugzilla https://bugzilla.kernel.org/show_bug.cgi?id=217571
This is specifically when a system advertises support for PMF, but doesn't support static power slider for any reason.
Upstream fix in https://github.com/torvalds/linux/commit/146b6f6855e7656e8329910606595220c761daac, which has been backported to v6.1.36 (oem-6.1 in v6.1.34 now), v6.2.15 (linux/lunar in v6.2.13), v6.3.10 (linux/mantic in v6.3.8), v6.4. |
|