mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-15 02:57:49 +00:00
Merge branches 'pm-cpufreq' and 'pm-cpuidle'
* pm-cpufreq: cpufreq: schedutil: restore cached freq when next_f is not changed acpi-cpufreq: Honor _PSD table setting on new AMD CPUs cpufreq: intel_pstate: Delete intel_pstate sysfs if failed to register the driver cpufreq: Improve code around unlisted freq check * pm-cpuidle: intel_idle: Ignore _CST if control cannot be taken from the platform cpuidle: Remove pointless stub intel_idle: mention assumption that WBINVD is not needed MAINTAINERS: Add section for cpuidle-psci PM domain
This commit is contained in:
commit
db06391e05
7 changed files with 50 additions and 23 deletions
|
@ -4588,6 +4588,14 @@ L: linux-arm-kernel@lists.infradead.org
|
||||||
S: Supported
|
S: Supported
|
||||||
F: drivers/cpuidle/cpuidle-psci.c
|
F: drivers/cpuidle/cpuidle-psci.c
|
||||||
|
|
||||||
|
CPUIDLE DRIVER - ARM PSCI PM DOMAIN
|
||||||
|
M: Ulf Hansson <ulf.hansson@linaro.org>
|
||||||
|
L: linux-pm@vger.kernel.org
|
||||||
|
L: linux-arm-kernel@lists.infradead.org
|
||||||
|
S: Supported
|
||||||
|
F: drivers/cpuidle/cpuidle-psci.h
|
||||||
|
F: drivers/cpuidle/cpuidle-psci-domain.c
|
||||||
|
|
||||||
CRAMFS FILESYSTEM
|
CRAMFS FILESYSTEM
|
||||||
M: Nicolas Pitre <nico@fluxnic.net>
|
M: Nicolas Pitre <nico@fluxnic.net>
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
|
|
@ -691,7 +691,8 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
||||||
cpumask_copy(policy->cpus, topology_core_cpumask(cpu));
|
cpumask_copy(policy->cpus, topology_core_cpumask(cpu));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_amd_hwpstate_cpu(cpu) && !acpi_pstate_strict) {
|
if (check_amd_hwpstate_cpu(cpu) && boot_cpu_data.x86 < 0x19 &&
|
||||||
|
!acpi_pstate_strict) {
|
||||||
cpumask_clear(policy->cpus);
|
cpumask_clear(policy->cpus);
|
||||||
cpumask_set_cpu(cpu, policy->cpus);
|
cpumask_set_cpu(cpu, policy->cpus);
|
||||||
cpumask_copy(data->freqdomain_cpus,
|
cpumask_copy(data->freqdomain_cpus,
|
||||||
|
|
|
@ -1454,14 +1454,13 @@ static int cpufreq_online(unsigned int cpu)
|
||||||
*/
|
*/
|
||||||
if ((cpufreq_driver->flags & CPUFREQ_NEED_INITIAL_FREQ_CHECK)
|
if ((cpufreq_driver->flags & CPUFREQ_NEED_INITIAL_FREQ_CHECK)
|
||||||
&& has_target()) {
|
&& has_target()) {
|
||||||
|
unsigned int old_freq = policy->cur;
|
||||||
|
|
||||||
/* Are we running at unknown frequency ? */
|
/* Are we running at unknown frequency ? */
|
||||||
ret = cpufreq_frequency_table_get_index(policy, policy->cur);
|
ret = cpufreq_frequency_table_get_index(policy, old_freq);
|
||||||
if (ret == -EINVAL) {
|
if (ret == -EINVAL) {
|
||||||
/* Warn user and fix it */
|
ret = __cpufreq_driver_target(policy, old_freq - 1,
|
||||||
pr_warn("%s: CPU%d: Running at unlisted freq: %u KHz\n",
|
CPUFREQ_RELATION_L);
|
||||||
__func__, policy->cpu, policy->cur);
|
|
||||||
ret = __cpufreq_driver_target(policy, policy->cur - 1,
|
|
||||||
CPUFREQ_RELATION_L);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reaching here after boot in a few seconds may not
|
* Reaching here after boot in a few seconds may not
|
||||||
|
@ -1469,8 +1468,8 @@ static int cpufreq_online(unsigned int cpu)
|
||||||
* frequency for longer duration. Hence, a BUG_ON().
|
* frequency for longer duration. Hence, a BUG_ON().
|
||||||
*/
|
*/
|
||||||
BUG_ON(ret);
|
BUG_ON(ret);
|
||||||
pr_warn("%s: CPU%d: Unlisted initial frequency changed to: %u KHz\n",
|
pr_info("%s: CPU%d: Running at unlisted initial frequency: %u KHz, changing to: %u KHz\n",
|
||||||
__func__, policy->cpu, policy->cur);
|
__func__, policy->cpu, old_freq, policy->cur);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1420,6 +1420,24 @@ static void __init intel_pstate_sysfs_expose_params(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void __init intel_pstate_sysfs_remove(void)
|
||||||
|
{
|
||||||
|
if (!intel_pstate_kobject)
|
||||||
|
return;
|
||||||
|
|
||||||
|
sysfs_remove_group(intel_pstate_kobject, &intel_pstate_attr_group);
|
||||||
|
|
||||||
|
if (!per_cpu_limits) {
|
||||||
|
sysfs_remove_file(intel_pstate_kobject, &max_perf_pct.attr);
|
||||||
|
sysfs_remove_file(intel_pstate_kobject, &min_perf_pct.attr);
|
||||||
|
|
||||||
|
if (x86_match_cpu(intel_pstate_cpu_ee_disable_ids))
|
||||||
|
sysfs_remove_file(intel_pstate_kobject, &energy_efficiency.attr);
|
||||||
|
}
|
||||||
|
|
||||||
|
kobject_put(intel_pstate_kobject);
|
||||||
|
}
|
||||||
|
|
||||||
static void intel_pstate_sysfs_expose_hwp_dynamic_boost(void)
|
static void intel_pstate_sysfs_expose_hwp_dynamic_boost(void)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
@ -3063,8 +3081,10 @@ hwp_cpu_matched:
|
||||||
mutex_lock(&intel_pstate_driver_lock);
|
mutex_lock(&intel_pstate_driver_lock);
|
||||||
rc = intel_pstate_register_driver(default_driver);
|
rc = intel_pstate_register_driver(default_driver);
|
||||||
mutex_unlock(&intel_pstate_driver_lock);
|
mutex_unlock(&intel_pstate_driver_lock);
|
||||||
if (rc)
|
if (rc) {
|
||||||
|
intel_pstate_sysfs_remove();
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
if (hwp_active) {
|
if (hwp_active) {
|
||||||
const struct x86_cpu_id *id;
|
const struct x86_cpu_id *id;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* intel_idle is a cpuidle driver that loads on specific Intel processors
|
* intel_idle is a cpuidle driver that loads on all Intel CPUs with MWAIT
|
||||||
* in lieu of the legacy ACPI processor_idle driver. The intent is to
|
* in lieu of the legacy ACPI processor_idle driver. The intent is to
|
||||||
* make Linux more efficient on these processors, as intel_idle knows
|
* make Linux more efficient on these processors, as intel_idle knows
|
||||||
* more than ACPI, as well as make Linux more immune to ACPI BIOS bugs.
|
* more than ACPI, as well as make Linux more immune to ACPI BIOS bugs.
|
||||||
|
@ -20,7 +20,11 @@
|
||||||
* All CPUs have same idle states as boot CPU
|
* All CPUs have same idle states as boot CPU
|
||||||
*
|
*
|
||||||
* Chipset BM_STS (bus master status) bit is a NOP
|
* Chipset BM_STS (bus master status) bit is a NOP
|
||||||
* for preventing entry into deep C-stats
|
* for preventing entry into deep C-states
|
||||||
|
*
|
||||||
|
* CPU will flush caches as needed when entering a C-state via MWAIT
|
||||||
|
* (in contrast to entering ACPI C3, in which case the WBINVD
|
||||||
|
* instruction needs to be executed to flush the caches)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1212,14 +1216,13 @@ static bool __init intel_idle_acpi_cst_extract(void)
|
||||||
if (!intel_idle_cst_usable())
|
if (!intel_idle_cst_usable())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!acpi_processor_claim_cst_control()) {
|
if (!acpi_processor_claim_cst_control())
|
||||||
acpi_state_table.count = 0;
|
break;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
acpi_state_table.count = 0;
|
||||||
pr_debug("ACPI _CST not found or not usable\n");
|
pr_debug("ACPI _CST not found or not usable\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -271,13 +271,8 @@ struct cpuidle_governor {
|
||||||
void (*reflect) (struct cpuidle_device *dev, int index);
|
void (*reflect) (struct cpuidle_device *dev, int index);
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_CPU_IDLE
|
|
||||||
extern int cpuidle_register_governor(struct cpuidle_governor *gov);
|
extern int cpuidle_register_governor(struct cpuidle_governor *gov);
|
||||||
extern s64 cpuidle_governor_latency_req(unsigned int cpu);
|
extern s64 cpuidle_governor_latency_req(unsigned int cpu);
|
||||||
#else
|
|
||||||
static inline int cpuidle_register_governor(struct cpuidle_governor *gov)
|
|
||||||
{return 0;}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __CPU_PM_CPU_IDLE_ENTER(low_level_idle_enter, \
|
#define __CPU_PM_CPU_IDLE_ENTER(low_level_idle_enter, \
|
||||||
idx, \
|
idx, \
|
||||||
|
|
|
@ -441,6 +441,7 @@ static void sugov_update_single(struct update_util_data *hook, u64 time,
|
||||||
unsigned long util, max;
|
unsigned long util, max;
|
||||||
unsigned int next_f;
|
unsigned int next_f;
|
||||||
bool busy;
|
bool busy;
|
||||||
|
unsigned int cached_freq = sg_policy->cached_raw_freq;
|
||||||
|
|
||||||
sugov_iowait_boost(sg_cpu, time, flags);
|
sugov_iowait_boost(sg_cpu, time, flags);
|
||||||
sg_cpu->last_update = time;
|
sg_cpu->last_update = time;
|
||||||
|
@ -464,8 +465,8 @@ static void sugov_update_single(struct update_util_data *hook, u64 time,
|
||||||
if (busy && next_f < sg_policy->next_freq) {
|
if (busy && next_f < sg_policy->next_freq) {
|
||||||
next_f = sg_policy->next_freq;
|
next_f = sg_policy->next_freq;
|
||||||
|
|
||||||
/* Reset cached freq as next_freq has changed */
|
/* Restore cached freq as next_freq has changed */
|
||||||
sg_policy->cached_raw_freq = 0;
|
sg_policy->cached_raw_freq = cached_freq;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue