Merge back cpufreq material for 6.12
This commit is contained in:
commit
c4a6c82c9e
@ -575,30 +575,11 @@ unsigned int cpufreq_policy_transition_delay_us(struct cpufreq_policy *policy)
|
||||
return policy->transition_delay_us;
|
||||
|
||||
latency = policy->cpuinfo.transition_latency / NSEC_PER_USEC;
|
||||
if (latency) {
|
||||
unsigned int max_delay_us = 2 * MSEC_PER_SEC;
|
||||
if (latency)
|
||||
/* Give a 50% breathing room between updates */
|
||||
return latency + (latency >> 1);
|
||||
|
||||
/*
|
||||
* If the platform already has high transition_latency, use it
|
||||
* as-is.
|
||||
*/
|
||||
if (latency > max_delay_us)
|
||||
return latency;
|
||||
|
||||
/*
|
||||
* For platforms that can change the frequency very fast (< 2
|
||||
* us), the above formula gives a decent transition delay. But
|
||||
* for platforms where transition_latency is in milliseconds, it
|
||||
* ends up giving unrealistic values.
|
||||
*
|
||||
* Cap the default transition delay to 2 ms, which seems to be
|
||||
* a reasonable amount of time after which we should reevaluate
|
||||
* the frequency.
|
||||
*/
|
||||
return min(latency * LATENCY_MULTIPLIER, max_delay_us);
|
||||
}
|
||||
|
||||
return LATENCY_MULTIPLIER;
|
||||
return USEC_PER_MSEC;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(cpufreq_policy_transition_delay_us);
|
||||
|
||||
|
@ -2425,6 +2425,10 @@ static const struct x86_cpu_id intel_pstate_cpu_oob_ids[] __initconst = {
|
||||
X86_MATCH(INTEL_ICELAKE_X, core_funcs),
|
||||
X86_MATCH(INTEL_SAPPHIRERAPIDS_X, core_funcs),
|
||||
X86_MATCH(INTEL_EMERALDRAPIDS_X, core_funcs),
|
||||
X86_MATCH(INTEL_GRANITERAPIDS_D, core_funcs),
|
||||
X86_MATCH(INTEL_GRANITERAPIDS_X, core_funcs),
|
||||
X86_MATCH(INTEL_ATOM_CRESTMONT, core_funcs),
|
||||
X86_MATCH(INTEL_ATOM_CRESTMONT_X, core_funcs),
|
||||
{}
|
||||
};
|
||||
#endif
|
||||
|
@ -238,4 +238,5 @@ bail_noprops:
|
||||
module_init(maple_cpufreq_init);
|
||||
|
||||
|
||||
MODULE_DESCRIPTION("cpufreq driver for Maple 970FX/970MP boards");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
@ -269,5 +269,6 @@ static void __exit pas_cpufreq_exit(void)
|
||||
module_init(pas_cpufreq_init);
|
||||
module_exit(pas_cpufreq_exit);
|
||||
|
||||
MODULE_DESCRIPTION("cpufreq driver for PA Semi PWRficient");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Egor Martovetsky <egor@pasemi.com>, Olof Johansson <olof@lixom.net>");
|
||||
|
@ -671,4 +671,5 @@ static int __init g5_cpufreq_init(void)
|
||||
module_init(g5_cpufreq_init);
|
||||
|
||||
|
||||
MODULE_DESCRIPTION("cpufreq driver for SMU & 970FX based G5 Macs");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
@ -1160,5 +1160,6 @@ static void __exit powernv_cpufreq_exit(void)
|
||||
}
|
||||
module_exit(powernv_cpufreq_exit);
|
||||
|
||||
MODULE_DESCRIPTION("cpufreq driver for IBM/OpenPOWER powernv systems");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Vaidyanathan Srinivasan <svaidy at linux.vnet.ibm.com>");
|
||||
|
@ -168,5 +168,6 @@ static void __exit cbe_cpufreq_exit(void)
|
||||
module_init(cbe_cpufreq_init);
|
||||
module_exit(cbe_cpufreq_exit);
|
||||
|
||||
MODULE_DESCRIPTION("cpufreq driver for Cell BE processors");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Christian Krafft <krafft@de.ibm.com>");
|
||||
|
@ -577,12 +577,6 @@ static inline unsigned long cpufreq_scale(unsigned long old, u_int div,
|
||||
#define CPUFREQ_POLICY_POWERSAVE (1)
|
||||
#define CPUFREQ_POLICY_PERFORMANCE (2)
|
||||
|
||||
/*
|
||||
* The polling frequency depends on the capability of the processor. Default
|
||||
* polling frequency is 1000 times the transition latency of the processor.
|
||||
*/
|
||||
#define LATENCY_MULTIPLIER (1000)
|
||||
|
||||
struct cpufreq_governor {
|
||||
char name[CPUFREQ_NAME_LEN];
|
||||
int (*init)(struct cpufreq_policy *policy);
|
||||
|
Loading…
Reference in New Issue
Block a user