Skip to content

Commit 98b52c6

Browse files
dhananjay-AMDsuperm1
authored andcommitted
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>
1 parent afc9506 commit 98b52c6

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
@@ -1559,19 +1559,17 @@ static int amd_pstate_epp_set_policy(struct cpufreq_policy *policy)
15591559
return 0;
15601560
}
15611561

1562-
static int amd_pstate_epp_cpu_online(struct cpufreq_policy *policy)
1562+
static int amd_pstate_cpu_online(struct cpufreq_policy *policy)
15631563
{
1564-
pr_debug("AMD CPU Core %d going online\n", policy->cpu);
1565-
15661564
return amd_pstate_cppc_enable(policy);
15671565
}
15681566

1569-
static int amd_pstate_epp_cpu_offline(struct cpufreq_policy *policy)
1567+
static int amd_pstate_cpu_offline(struct cpufreq_policy *policy)
15701568
{
15711569
return 0;
15721570
}
15731571

1574-
static int amd_pstate_epp_suspend(struct cpufreq_policy *policy)
1572+
static int amd_pstate_suspend(struct cpufreq_policy *policy)
15751573
{
15761574
struct amd_cpudata *cpudata = policy->driver_data;
15771575

@@ -1609,6 +1607,9 @@ static struct cpufreq_driver amd_pstate_driver = {
16091607
.fast_switch = amd_pstate_fast_switch,
16101608
.init = amd_pstate_cpu_init,
16111609
.exit = amd_pstate_cpu_exit,
1610+
.online = amd_pstate_cpu_online,
1611+
.offline = amd_pstate_cpu_offline,
1612+
.suspend = amd_pstate_suspend,
16121613
.set_boost = amd_pstate_set_boost,
16131614
.update_limits = amd_pstate_update_limits,
16141615
.name = "amd-pstate",
@@ -1621,9 +1622,9 @@ static struct cpufreq_driver amd_pstate_epp_driver = {
16211622
.setpolicy = amd_pstate_epp_set_policy,
16221623
.init = amd_pstate_epp_cpu_init,
16231624
.exit = amd_pstate_epp_cpu_exit,
1624-
.offline = amd_pstate_epp_cpu_offline,
1625-
.online = amd_pstate_epp_cpu_online,
1626-
.suspend = amd_pstate_epp_suspend,
1625+
.offline = amd_pstate_cpu_offline,
1626+
.online = amd_pstate_cpu_online,
1627+
.suspend = amd_pstate_suspend,
16271628
.resume = amd_pstate_epp_resume,
16281629
.update_limits = amd_pstate_update_limits,
16291630
.set_boost = amd_pstate_set_boost,

0 commit comments

Comments
 (0)