Skip to content

Commit e6fcc3e

Browse files
committed
cpufreq/amd-pstate: Add offline, online and suspend callbacks for amd_pstate_driver
JIRA: https://issues.redhat.com/browse/RHEL-106954 commit 98b52c6 Author: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com> Date: Mon Apr 28 06:25:21 2025 +0000 cpufreq/amd-pstate: Add offline, online and suspend callbacks for amd_pstate_driver Rename and use the existing amd_pstate_epp callbacks for amd_pstate driver as well. Remove the debug print in online callback while at it. These callbacks will be needed to support the "Requested CPU Min Frequency" BIOS option. Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com> Link: https://lore.kernel.org/r/20250428062520.4997-2-dhananjay.ugwekar@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Steve Best <sbest@redhat.com>
1 parent 09d0790 commit e6fcc3e

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

drivers/cpufreq/amd-pstate.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,19 +1561,17 @@ static int amd_pstate_epp_set_policy(struct cpufreq_policy *policy)
15611561
return 0;
15621562
}
15631563

1564-
static int amd_pstate_epp_cpu_online(struct cpufreq_policy *policy)
1564+
static int amd_pstate_cpu_online(struct cpufreq_policy *policy)
15651565
{
1566-
pr_debug("AMD CPU Core %d going online\n", policy->cpu);
1567-
15681566
return amd_pstate_cppc_enable(policy);
15691567
}
15701568

1571-
static int amd_pstate_epp_cpu_offline(struct cpufreq_policy *policy)
1569+
static int amd_pstate_cpu_offline(struct cpufreq_policy *policy)
15721570
{
15731571
return 0;
15741572
}
15751573

1576-
static int amd_pstate_epp_suspend(struct cpufreq_policy *policy)
1574+
static int amd_pstate_suspend(struct cpufreq_policy *policy)
15771575
{
15781576
struct amd_cpudata *cpudata = policy->driver_data;
15791577

@@ -1611,6 +1609,9 @@ static struct cpufreq_driver amd_pstate_driver = {
16111609
.fast_switch = amd_pstate_fast_switch,
16121610
.init = amd_pstate_cpu_init,
16131611
.exit = amd_pstate_cpu_exit,
1612+
.online = amd_pstate_cpu_online,
1613+
.offline = amd_pstate_cpu_offline,
1614+
.suspend = amd_pstate_suspend,
16141615
.set_boost = amd_pstate_set_boost,
16151616
.update_limits = amd_pstate_update_limits,
16161617
.name = "amd-pstate",
@@ -1623,9 +1624,9 @@ static struct cpufreq_driver amd_pstate_epp_driver = {
16231624
.setpolicy = amd_pstate_epp_set_policy,
16241625
.init = amd_pstate_epp_cpu_init,
16251626
.exit = amd_pstate_epp_cpu_exit,
1626-
.offline = amd_pstate_epp_cpu_offline,
1627-
.online = amd_pstate_epp_cpu_online,
1628-
.suspend = amd_pstate_epp_suspend,
1627+
.offline = amd_pstate_cpu_offline,
1628+
.online = amd_pstate_cpu_online,
1629+
.suspend = amd_pstate_suspend,
16291630
.resume = amd_pstate_epp_resume,
16301631
.update_limits = amd_pstate_update_limits,
16311632
.set_boost = amd_pstate_set_boost,

0 commit comments

Comments
 (0)