Skip to content

Commit c4a6c82

Browse files
committed
Merge back cpufreq material for 6.12
2 parents 15d7518 + 3ca2a3d commit c4a6c82

File tree

8 files changed

+13
-29
lines changed

8 files changed

+13
-29
lines changed

drivers/cpufreq/cpufreq.c

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -575,30 +575,11 @@ unsigned int cpufreq_policy_transition_delay_us(struct cpufreq_policy *policy)
575575
return policy->transition_delay_us;
576576

577577
latency = policy->cpuinfo.transition_latency / NSEC_PER_USEC;
578-
if (latency) {
579-
unsigned int max_delay_us = 2 * MSEC_PER_SEC;
578+
if (latency)
579+
/* Give a 50% breathing room between updates */
580+
return latency + (latency >> 1);
580581

581-
/*
582-
* If the platform already has high transition_latency, use it
583-
* as-is.
584-
*/
585-
if (latency > max_delay_us)
586-
return latency;
587-
588-
/*
589-
* For platforms that can change the frequency very fast (< 2
590-
* us), the above formula gives a decent transition delay. But
591-
* for platforms where transition_latency is in milliseconds, it
592-
* ends up giving unrealistic values.
593-
*
594-
* Cap the default transition delay to 2 ms, which seems to be
595-
* a reasonable amount of time after which we should reevaluate
596-
* the frequency.
597-
*/
598-
return min(latency * LATENCY_MULTIPLIER, max_delay_us);
599-
}
600-
601-
return LATENCY_MULTIPLIER;
582+
return USEC_PER_MSEC;
602583
}
603584
EXPORT_SYMBOL_GPL(cpufreq_policy_transition_delay_us);
604585

drivers/cpufreq/intel_pstate.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2425,6 +2425,10 @@ static const struct x86_cpu_id intel_pstate_cpu_oob_ids[] __initconst = {
24252425
X86_MATCH(INTEL_ICELAKE_X, core_funcs),
24262426
X86_MATCH(INTEL_SAPPHIRERAPIDS_X, core_funcs),
24272427
X86_MATCH(INTEL_EMERALDRAPIDS_X, core_funcs),
2428+
X86_MATCH(INTEL_GRANITERAPIDS_D, core_funcs),
2429+
X86_MATCH(INTEL_GRANITERAPIDS_X, core_funcs),
2430+
X86_MATCH(INTEL_ATOM_CRESTMONT, core_funcs),
2431+
X86_MATCH(INTEL_ATOM_CRESTMONT_X, core_funcs),
24282432
{}
24292433
};
24302434
#endif

drivers/cpufreq/maple-cpufreq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,4 +238,5 @@ static int __init maple_cpufreq_init(void)
238238
module_init(maple_cpufreq_init);
239239

240240

241+
MODULE_DESCRIPTION("cpufreq driver for Maple 970FX/970MP boards");
241242
MODULE_LICENSE("GPL");

drivers/cpufreq/pasemi-cpufreq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,5 +269,6 @@ static void __exit pas_cpufreq_exit(void)
269269
module_init(pas_cpufreq_init);
270270
module_exit(pas_cpufreq_exit);
271271

272+
MODULE_DESCRIPTION("cpufreq driver for PA Semi PWRficient");
272273
MODULE_LICENSE("GPL");
273274
MODULE_AUTHOR("Egor Martovetsky <[email protected]>, Olof Johansson <[email protected]>");

drivers/cpufreq/pmac64-cpufreq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,4 +671,5 @@ static int __init g5_cpufreq_init(void)
671671
module_init(g5_cpufreq_init);
672672

673673

674+
MODULE_DESCRIPTION("cpufreq driver for SMU & 970FX based G5 Macs");
674675
MODULE_LICENSE("GPL");

drivers/cpufreq/powernv-cpufreq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,5 +1160,6 @@ static void __exit powernv_cpufreq_exit(void)
11601160
}
11611161
module_exit(powernv_cpufreq_exit);
11621162

1163+
MODULE_DESCRIPTION("cpufreq driver for IBM/OpenPOWER powernv systems");
11631164
MODULE_LICENSE("GPL");
11641165
MODULE_AUTHOR("Vaidyanathan Srinivasan <svaidy at linux.vnet.ibm.com>");

drivers/cpufreq/ppc_cbe_cpufreq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,5 +168,6 @@ static void __exit cbe_cpufreq_exit(void)
168168
module_init(cbe_cpufreq_init);
169169
module_exit(cbe_cpufreq_exit);
170170

171+
MODULE_DESCRIPTION("cpufreq driver for Cell BE processors");
171172
MODULE_LICENSE("GPL");
172173
MODULE_AUTHOR("Christian Krafft <[email protected]>");

include/linux/cpufreq.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -577,12 +577,6 @@ static inline unsigned long cpufreq_scale(unsigned long old, u_int div,
577577
#define CPUFREQ_POLICY_POWERSAVE (1)
578578
#define CPUFREQ_POLICY_PERFORMANCE (2)
579579

580-
/*
581-
* The polling frequency depends on the capability of the processor. Default
582-
* polling frequency is 1000 times the transition latency of the processor.
583-
*/
584-
#define LATENCY_MULTIPLIER (1000)
585-
586580
struct cpufreq_governor {
587581
char name[CPUFREQ_NAME_LEN];
588582
int (*init)(struct cpufreq_policy *policy);

0 commit comments

Comments
 (0)