aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/processor_idle.c
diff options
context:
space:
mode:
authorMark Gross <mgross@linux.intel.com>2008-02-05 01:30:09 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 12:44:22 -0500
commitf011e2e2df3393c16b0fdc48e855e909b7e021ee (patch)
tree1ad56011597c739336d7068c8182fd9cfdddad5b /drivers/acpi/processor_idle.c
parentd82b35186eaa816267f044bd70cc0acb3c7971a3 (diff)
latency.c: use QoS infrastructure
Replace latency.c use with pm_qos_params use. Signed-off-by: mark gross <mgross@linux.intel.com> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: Len Brown <lenb@kernel.org> Cc: Jaroslav Kysela <perex@suse.cz> Cc: Takashi Iwai <tiwai@suse.de> Cc: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/acpi/processor_idle.c')
-rw-r--r--drivers/acpi/processor_idle.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index eb1f82f79153..199ea2146153 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -38,7 +38,7 @@
38#include <linux/dmi.h> 38#include <linux/dmi.h>
39#include <linux/moduleparam.h> 39#include <linux/moduleparam.h>
40#include <linux/sched.h> /* need_resched() */ 40#include <linux/sched.h> /* need_resched() */
41#include <linux/latency.h> 41#include <linux/pm_qos_params.h>
42#include <linux/clockchips.h> 42#include <linux/clockchips.h>
43#include <linux/cpuidle.h> 43#include <linux/cpuidle.h>
44 44
@@ -648,7 +648,8 @@ static void acpi_processor_idle(void)
648 if (cx->promotion.state && 648 if (cx->promotion.state &&
649 ((cx->promotion.state - pr->power.states) <= max_cstate)) { 649 ((cx->promotion.state - pr->power.states) <= max_cstate)) {
650 if (sleep_ticks > cx->promotion.threshold.ticks && 650 if (sleep_ticks > cx->promotion.threshold.ticks &&
651 cx->promotion.state->latency <= system_latency_constraint()) { 651 cx->promotion.state->latency <=
652 pm_qos_requirement(PM_QOS_CPU_DMA_LATENCY)) {
652 cx->promotion.count++; 653 cx->promotion.count++;
653 cx->demotion.count = 0; 654 cx->demotion.count = 0;
654 if (cx->promotion.count >= 655 if (cx->promotion.count >=
@@ -692,7 +693,8 @@ static void acpi_processor_idle(void)
692 * or if the latency of the current state is unacceptable 693 * or if the latency of the current state is unacceptable
693 */ 694 */
694 if ((pr->power.state - pr->power.states) > max_cstate || 695 if ((pr->power.state - pr->power.states) > max_cstate ||
695 pr->power.state->latency > system_latency_constraint()) { 696 pr->power.state->latency >
697 pm_qos_requirement(PM_QOS_CPU_DMA_LATENCY)) {
696 if (cx->demotion.state) 698 if (cx->demotion.state)
697 next_state = cx->demotion.state; 699 next_state = cx->demotion.state;
698 } 700 }
@@ -1200,7 +1202,7 @@ static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
1200 "maximum allowed latency: %d usec\n", 1202 "maximum allowed latency: %d usec\n",
1201 pr->power.state ? pr->power.state - pr->power.states : 0, 1203 pr->power.state ? pr->power.state - pr->power.states : 0,
1202 max_cstate, (unsigned)pr->power.bm_activity, 1204 max_cstate, (unsigned)pr->power.bm_activity,
1203 system_latency_constraint()); 1205 pm_qos_requirement(PM_QOS_CPU_DMA_LATENCY));
1204 1206
1205 seq_puts(seq, "states:\n"); 1207 seq_puts(seq, "states:\n");
1206 1208
@@ -1718,8 +1720,9 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
1718 "ACPI: processor limited to max C-state %d\n", 1720 "ACPI: processor limited to max C-state %d\n",
1719 max_cstate); 1721 max_cstate);
1720 first_run++; 1722 first_run++;
1721#if !defined (CONFIG_CPU_IDLE) && defined (CONFIG_SMP) 1723#if !defined(CONFIG_CPU_IDLE) && defined(CONFIG_SMP)
1722 register_latency_notifier(&acpi_processor_latency_notifier); 1724 pm_qos_add_notifier(PM_QOS_CPU_DMA_LATENCY,
1725 &acpi_processor_latency_notifier);
1723#endif 1726#endif
1724 } 1727 }
1725 1728
@@ -1806,7 +1809,8 @@ int acpi_processor_power_exit(struct acpi_processor *pr,
1806 */ 1809 */
1807 cpu_idle_wait(); 1810 cpu_idle_wait();
1808#ifdef CONFIG_SMP 1811#ifdef CONFIG_SMP
1809 unregister_latency_notifier(&acpi_processor_latency_notifier); 1812 pm_qos_remove_notifier(PM_QOS_CPU_DMA_LATENCY,
1813 &acpi_processor_latency_notifier);
1810#endif 1814#endif
1811 } 1815 }
1812#endif 1816#endif