mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
latency.c: use QoS infrastructure
Replace latency.c use with pm_qos_params use. Signed-off-by: mark gross <[email protected]> Cc: "John W. Linville" <[email protected]> Cc: Len Brown <[email protected]> Cc: Jaroslav Kysela <[email protected]> Cc: Takashi Iwai <[email protected]> Cc: Arjan van de Ven <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
d82b35186e
commit
f011e2e2df
6 changed files with 26 additions and 322 deletions
|
|
@ -38,7 +38,7 @@
|
|||
#include <linux/dmi.h>
|
||||
#include <linux/moduleparam.h>
|
||||
#include <linux/sched.h> /* need_resched() */
|
||||
#include <linux/latency.h>
|
||||
#include <linux/pm_qos_params.h>
|
||||
#include <linux/clockchips.h>
|
||||
#include <linux/cpuidle.h>
|
||||
|
||||
|
|
@ -648,7 +648,8 @@ static void acpi_processor_idle(void)
|
|||
if (cx->promotion.state &&
|
||||
((cx->promotion.state - pr->power.states) <= max_cstate)) {
|
||||
if (sleep_ticks > cx->promotion.threshold.ticks &&
|
||||
cx->promotion.state->latency <= system_latency_constraint()) {
|
||||
cx->promotion.state->latency <=
|
||||
pm_qos_requirement(PM_QOS_CPU_DMA_LATENCY)) {
|
||||
cx->promotion.count++;
|
||||
cx->demotion.count = 0;
|
||||
if (cx->promotion.count >=
|
||||
|
|
@ -692,7 +693,8 @@ static void acpi_processor_idle(void)
|
|||
* or if the latency of the current state is unacceptable
|
||||
*/
|
||||
if ((pr->power.state - pr->power.states) > max_cstate ||
|
||||
pr->power.state->latency > system_latency_constraint()) {
|
||||
pr->power.state->latency >
|
||||
pm_qos_requirement(PM_QOS_CPU_DMA_LATENCY)) {
|
||||
if (cx->demotion.state)
|
||||
next_state = cx->demotion.state;
|
||||
}
|
||||
|
|
@ -1200,7 +1202,7 @@ static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
|
|||
"maximum allowed latency: %d usec\n",
|
||||
pr->power.state ? pr->power.state - pr->power.states : 0,
|
||||
max_cstate, (unsigned)pr->power.bm_activity,
|
||||
system_latency_constraint());
|
||||
pm_qos_requirement(PM_QOS_CPU_DMA_LATENCY));
|
||||
|
||||
seq_puts(seq, "states:\n");
|
||||
|
||||
|
|
@ -1718,8 +1720,9 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
|
|||
"ACPI: processor limited to max C-state %d\n",
|
||||
max_cstate);
|
||||
first_run++;
|
||||
#if !defined (CONFIG_CPU_IDLE) && defined (CONFIG_SMP)
|
||||
register_latency_notifier(&acpi_processor_latency_notifier);
|
||||
#if !defined(CONFIG_CPU_IDLE) && defined(CONFIG_SMP)
|
||||
pm_qos_add_notifier(PM_QOS_CPU_DMA_LATENCY,
|
||||
&acpi_processor_latency_notifier);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -1806,7 +1809,8 @@ int acpi_processor_power_exit(struct acpi_processor *pr,
|
|||
*/
|
||||
cpu_idle_wait();
|
||||
#ifdef CONFIG_SMP
|
||||
unregister_latency_notifier(&acpi_processor_latency_notifier);
|
||||
pm_qos_remove_notifier(PM_QOS_CPU_DMA_LATENCY,
|
||||
&acpi_processor_latency_notifier);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue