release 6.14.9
This commit is contained in:
@@ -95,7 +95,7 @@ Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
|
||||
WARN_ON(fast_switch && !policy->fast_switch_enabled);
|
||||
/*
|
||||
@@ -908,7 +911,6 @@ static int amd_pstate_init_freq(struct a
|
||||
@@ -907,7 +910,6 @@ static int amd_pstate_init_freq(struct a
|
||||
{
|
||||
int ret;
|
||||
u32 min_freq, max_freq;
|
||||
@@ -103,7 +103,7 @@ Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
u32 nominal_freq, lowest_nonlinear_freq;
|
||||
struct cppc_perf_caps cppc_perf;
|
||||
|
||||
@@ -926,16 +928,17 @@ static int amd_pstate_init_freq(struct a
|
||||
@@ -925,16 +927,17 @@ static int amd_pstate_init_freq(struct a
|
||||
else
|
||||
nominal_freq = cppc_perf.nominal_freq;
|
||||
|
||||
|
@@ -24,7 +24,7 @@ Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
|
||||
--- a/drivers/cpufreq/amd-pstate.c
|
||||
+++ b/drivers/cpufreq/amd-pstate.c
|
||||
@@ -856,10 +856,6 @@ static void amd_pstate_update_limits(uns
|
||||
@@ -855,10 +855,6 @@ static void amd_pstate_update_limits(uns
|
||||
sched_set_itmt_core_prio((int)cur_high, cpu);
|
||||
}
|
||||
cpufreq_cpu_put(policy);
|
||||
|
@@ -69,7 +69,7 @@ Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
}
|
||||
|
||||
static int amd_pstate_cpu_boost_update(struct cpufreq_policy *policy, bool on)
|
||||
@@ -824,28 +821,23 @@ static void amd_pstate_init_prefcore(str
|
||||
@@ -823,28 +820,23 @@ static void amd_pstate_init_prefcore(str
|
||||
|
||||
static void amd_pstate_update_limits(unsigned int cpu)
|
||||
{
|
||||
@@ -102,7 +102,7 @@ Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
|
||||
prev_high = READ_ONCE(cpudata->prefcore_ranking);
|
||||
highest_perf_changed = (prev_high != cur_high);
|
||||
@@ -855,7 +847,6 @@ static void amd_pstate_update_limits(uns
|
||||
@@ -854,7 +846,6 @@ static void amd_pstate_update_limits(uns
|
||||
if (cur_high < CPPC_MAX_PERF)
|
||||
sched_set_itmt_core_prio((int)cur_high, cpu);
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@ Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
|
||||
--- a/drivers/cpufreq/amd-pstate.c
|
||||
+++ b/drivers/cpufreq/amd-pstate.c
|
||||
@@ -832,8 +832,6 @@ static void amd_pstate_update_limits(uns
|
||||
@@ -831,8 +831,6 @@ static void amd_pstate_update_limits(uns
|
||||
if (!policy)
|
||||
return;
|
||||
|
||||
|
@@ -17,7 +17,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
|
||||
--- a/drivers/cpufreq/amd-pstate.c
|
||||
+++ b/drivers/cpufreq/amd-pstate.c
|
||||
@@ -1028,6 +1028,7 @@ static int amd_pstate_cpu_init(struct cp
|
||||
@@ -1027,6 +1027,7 @@ static int amd_pstate_cpu_init(struct cp
|
||||
free_cpudata2:
|
||||
freq_qos_remove_request(&cpudata->req[0]);
|
||||
free_cpudata1:
|
||||
@@ -25,7 +25,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
kfree(cpudata);
|
||||
return ret;
|
||||
}
|
||||
@@ -1521,6 +1522,7 @@ static int amd_pstate_epp_cpu_init(struc
|
||||
@@ -1520,6 +1521,7 @@ static int amd_pstate_epp_cpu_init(struc
|
||||
return 0;
|
||||
|
||||
free_cpudata1:
|
||||
|
@@ -66,7 +66,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
|
||||
if (on)
|
||||
policy->cpuinfo.max_freq = max_freq;
|
||||
@@ -917,13 +917,10 @@ static int amd_pstate_init_freq(struct a
|
||||
@@ -916,13 +916,10 @@ static int amd_pstate_init_freq(struct a
|
||||
nominal_freq *= 1000;
|
||||
|
||||
WRITE_ONCE(cpudata->nominal_freq, nominal_freq);
|
||||
@@ -80,7 +80,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
|
||||
/**
|
||||
* Below values need to be initialized correctly, otherwise driver will fail to load
|
||||
@@ -948,9 +945,9 @@ static int amd_pstate_init_freq(struct a
|
||||
@@ -947,9 +944,9 @@ static int amd_pstate_init_freq(struct a
|
||||
|
||||
static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
|
||||
{
|
||||
@@ -92,7 +92,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
|
||||
/*
|
||||
* Resetting PERF_CTL_MSR will put the CPU in P0 frequency,
|
||||
@@ -981,17 +978,11 @@ static int amd_pstate_cpu_init(struct cp
|
||||
@@ -980,17 +977,11 @@ static int amd_pstate_cpu_init(struct cp
|
||||
if (ret)
|
||||
goto free_cpudata1;
|
||||
|
||||
@@ -112,7 +112,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
|
||||
policy->boost_enabled = READ_ONCE(cpudata->boost_supported);
|
||||
|
||||
@@ -1015,9 +1006,6 @@ static int amd_pstate_cpu_init(struct cp
|
||||
@@ -1014,9 +1005,6 @@ static int amd_pstate_cpu_init(struct cp
|
||||
goto free_cpudata2;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
policy->driver_data = cpudata;
|
||||
|
||||
if (!current_pstate_driver->adjust_perf)
|
||||
@@ -1075,14 +1063,10 @@ static int amd_pstate_cpu_suspend(struct
|
||||
@@ -1074,14 +1062,10 @@ static int amd_pstate_cpu_suspend(struct
|
||||
static ssize_t show_amd_pstate_max_freq(struct cpufreq_policy *policy,
|
||||
char *buf)
|
||||
{
|
||||
@@ -138,7 +138,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
}
|
||||
|
||||
static ssize_t show_amd_pstate_lowest_nonlinear_freq(struct cpufreq_policy *policy,
|
||||
@@ -1440,10 +1424,10 @@ static bool amd_pstate_acpi_pm_profile_u
|
||||
@@ -1439,10 +1423,10 @@ static bool amd_pstate_acpi_pm_profile_u
|
||||
|
||||
static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy)
|
||||
{
|
||||
@@ -150,7 +150,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
|
||||
/*
|
||||
* Resetting PERF_CTL_MSR will put the CPU in P0 frequency,
|
||||
@@ -1474,19 +1458,13 @@ static int amd_pstate_epp_cpu_init(struc
|
||||
@@ -1473,19 +1457,13 @@ static int amd_pstate_epp_cpu_init(struc
|
||||
if (ret)
|
||||
goto free_cpudata1;
|
||||
|
||||
@@ -172,7 +172,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
policy->boost_enabled = READ_ONCE(cpudata->boost_supported);
|
||||
|
||||
/*
|
||||
@@ -1544,7 +1522,8 @@ static int amd_pstate_epp_update_limit(s
|
||||
@@ -1543,7 +1521,8 @@ static int amd_pstate_epp_update_limit(s
|
||||
struct amd_cpudata *cpudata = policy->driver_data;
|
||||
u8 epp;
|
||||
|
||||
|
@@ -293,7 +293,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
|
||||
if (on)
|
||||
policy->cpuinfo.max_freq = max_freq;
|
||||
@@ -882,30 +890,30 @@ static u32 amd_pstate_get_transition_lat
|
||||
@@ -881,30 +889,30 @@ static u32 amd_pstate_get_transition_lat
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -336,7 +336,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
min_freq = cppc_perf.lowest_freq;
|
||||
|
||||
if (quirks && quirks->nominal_freq)
|
||||
@@ -918,8 +926,8 @@ static int amd_pstate_init_freq(struct a
|
||||
@@ -917,8 +925,8 @@ static int amd_pstate_init_freq(struct a
|
||||
|
||||
WRITE_ONCE(cpudata->nominal_freq, nominal_freq);
|
||||
|
||||
@@ -347,7 +347,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
WRITE_ONCE(cpudata->lowest_nonlinear_freq, lowest_nonlinear_freq);
|
||||
|
||||
/**
|
||||
@@ -946,6 +954,7 @@ static int amd_pstate_init_freq(struct a
|
||||
@@ -945,6 +953,7 @@ static int amd_pstate_init_freq(struct a
|
||||
static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
|
||||
{
|
||||
struct amd_cpudata *cpudata;
|
||||
@@ -355,7 +355,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
struct device *dev;
|
||||
int ret;
|
||||
|
||||
@@ -981,8 +990,14 @@ static int amd_pstate_cpu_init(struct cp
|
||||
@@ -980,8 +989,14 @@ static int amd_pstate_cpu_init(struct cp
|
||||
policy->cpuinfo.transition_latency = amd_pstate_get_transition_latency(policy->cpu);
|
||||
policy->transition_delay_us = amd_pstate_get_transition_delay_us(policy->cpu);
|
||||
|
||||
@@ -372,7 +372,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
|
||||
policy->boost_enabled = READ_ONCE(cpudata->boost_supported);
|
||||
|
||||
@@ -1063,23 +1078,27 @@ static int amd_pstate_cpu_suspend(struct
|
||||
@@ -1062,23 +1077,27 @@ static int amd_pstate_cpu_suspend(struct
|
||||
static ssize_t show_amd_pstate_max_freq(struct cpufreq_policy *policy,
|
||||
char *buf)
|
||||
{
|
||||
@@ -408,7 +408,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1089,12 +1108,11 @@ static ssize_t show_amd_pstate_lowest_no
|
||||
@@ -1088,12 +1107,11 @@ static ssize_t show_amd_pstate_lowest_no
|
||||
static ssize_t show_amd_pstate_highest_perf(struct cpufreq_policy *policy,
|
||||
char *buf)
|
||||
{
|
||||
@@ -424,7 +424,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
}
|
||||
|
||||
static ssize_t show_amd_pstate_prefcore_ranking(struct cpufreq_policy *policy,
|
||||
@@ -1425,6 +1443,7 @@ static bool amd_pstate_acpi_pm_profile_u
|
||||
@@ -1424,6 +1442,7 @@ static bool amd_pstate_acpi_pm_profile_u
|
||||
static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy)
|
||||
{
|
||||
struct amd_cpudata *cpudata;
|
||||
@@ -432,7 +432,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
struct device *dev;
|
||||
u64 value;
|
||||
int ret;
|
||||
@@ -1458,8 +1477,15 @@ static int amd_pstate_epp_cpu_init(struc
|
||||
@@ -1457,8 +1476,15 @@ static int amd_pstate_epp_cpu_init(struc
|
||||
if (ret)
|
||||
goto free_cpudata1;
|
||||
|
||||
@@ -450,7 +450,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
/* It will be updated by governor */
|
||||
policy->cur = policy->cpuinfo.min_freq;
|
||||
|
||||
@@ -1520,6 +1546,7 @@ static void amd_pstate_epp_cpu_exit(stru
|
||||
@@ -1519,6 +1545,7 @@ static void amd_pstate_epp_cpu_exit(stru
|
||||
static int amd_pstate_epp_update_limit(struct cpufreq_policy *policy)
|
||||
{
|
||||
struct amd_cpudata *cpudata = policy->driver_data;
|
||||
@@ -458,7 +458,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
u8 epp;
|
||||
|
||||
if (policy->min != cpudata->min_limit_freq || policy->max != cpudata->max_limit_freq)
|
||||
@@ -1530,15 +1557,16 @@ static int amd_pstate_epp_update_limit(s
|
||||
@@ -1529,15 +1556,16 @@ static int amd_pstate_epp_update_limit(s
|
||||
else
|
||||
epp = READ_ONCE(cpudata->epp_cached);
|
||||
|
||||
@@ -480,7 +480,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
}
|
||||
|
||||
static int amd_pstate_epp_set_policy(struct cpufreq_policy *policy)
|
||||
@@ -1570,20 +1598,18 @@ static int amd_pstate_epp_set_policy(str
|
||||
@@ -1569,20 +1597,18 @@ static int amd_pstate_epp_set_policy(str
|
||||
static int amd_pstate_epp_reenable(struct cpufreq_policy *policy)
|
||||
{
|
||||
struct amd_cpudata *cpudata = policy->driver_data;
|
||||
@@ -504,7 +504,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
}
|
||||
|
||||
return amd_pstate_epp_update_limit(policy);
|
||||
@@ -1607,22 +1633,21 @@ static int amd_pstate_epp_cpu_online(str
|
||||
@@ -1606,22 +1632,21 @@ static int amd_pstate_epp_cpu_online(str
|
||||
static int amd_pstate_epp_cpu_offline(struct cpufreq_policy *policy)
|
||||
{
|
||||
struct amd_cpudata *cpudata = policy->driver_data;
|
||||
|
@@ -32,15 +32,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
static DEFINE_MUTEX(amd_pstate_driver_lock);
|
||||
|
||||
static u8 msr_get_epp(struct amd_cpudata *cpudata)
|
||||
@@ -752,7 +751,6 @@ static int amd_pstate_set_boost(struct c
|
||||
pr_err("Boost mode is not supported by this processor or SBIOS\n");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
- guard(mutex)(&amd_pstate_driver_lock);
|
||||
|
||||
ret = amd_pstate_cpu_boost_update(policy, state);
|
||||
refresh_frequency_limits(policy);
|
||||
@@ -1170,8 +1168,6 @@ static ssize_t store_energy_performance_
|
||||
@@ -1169,8 +1168,6 @@ static ssize_t store_energy_performance_
|
||||
if (ret < 0)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -49,7 +41,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
ret = amd_pstate_set_energy_pref_index(policy, ret);
|
||||
|
||||
return ret ? ret : count;
|
||||
@@ -1344,8 +1340,10 @@ int amd_pstate_update_status(const char
|
||||
@@ -1343,8 +1340,10 @@ int amd_pstate_update_status(const char
|
||||
if (mode_idx < 0 || mode_idx >= AMD_PSTATE_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -61,7 +53,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1366,7 +1364,6 @@ static ssize_t status_store(struct devic
|
||||
@@ -1365,7 +1364,6 @@ static ssize_t status_store(struct devic
|
||||
char *p = memchr(buf, '\n', count);
|
||||
int ret;
|
||||
|
||||
@@ -69,7 +61,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
ret = amd_pstate_update_status(buf, p ? p - buf : count);
|
||||
|
||||
return ret < 0 ? ret : count;
|
||||
@@ -1638,8 +1635,6 @@ static int amd_pstate_epp_cpu_offline(st
|
||||
@@ -1637,8 +1635,6 @@ static int amd_pstate_epp_cpu_offline(st
|
||||
if (cpudata->suspended)
|
||||
return 0;
|
||||
|
||||
@@ -78,7 +70,7 @@ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
|
||||
if (trace_amd_pstate_epp_perf_enabled()) {
|
||||
trace_amd_pstate_epp_perf(cpudata->cpu, perf.highest_perf,
|
||||
AMD_CPPC_EPP_BALANCE_POWERSAVE,
|
||||
@@ -1679,8 +1674,6 @@ static int amd_pstate_epp_resume(struct
|
||||
@@ -1678,8 +1674,6 @@ static int amd_pstate_epp_resume(struct
|
||||
struct amd_cpudata *cpudata = policy->driver_data;
|
||||
|
||||
if (cpudata->suspended) {
|
||||
|
Reference in New Issue
Block a user