summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-06-24 19:37:00 -0400
committerLen Brown <len.brown@intel.com>2006-06-28 03:14:50 -0400
commitc4a001b1ea32e09f7556178249b8885418858b5c (patch)
tree29abe5b8088968cdc28de3bd6888d05366f2478a /drivers/acpi
parentc5ab81ca01ad4a8870b456f93dd2fb3d815f91d9 (diff)
downloadop-kernel-dev-c4a001b1ea32e09f7556178249b8885418858b5c.zip
op-kernel-dev-c4a001b1ea32e09f7556178249b8885418858b5c.tar.gz
ACPI: C-States: only demote on current bus mastering activity
Only if bus master activity is going on at the present, we should avoid entering C3-type sleep, as it might be a faulty transition. As long as the bm_activity bitmask was based on the number of calls to the ACPI idle function, looking at previous moments made sense. Now, with it being based on what happened this jiffy, looking at this jiffy should be sufficient. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/processor_idle.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index af9f2af..f8d2b2f 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -287,10 +287,10 @@ static void acpi_processor_idle(void)
pr->power.bm_check_timestamp = jiffies;
/*
- * Apply bus mastering demotion policy. Automatically demote
+ * If bus mastering is or was active this jiffy, demote
* to avoid a faulty transition. Note that the processor
* won't enter a low-power state during this call (to this
- * funciton) but should upon the next.
+ * function) but should upon the next.
*
* TBD: A better policy might be to fallback to the demotion
* state (use it for this quantum only) istead of
@@ -298,7 +298,8 @@ static void acpi_processor_idle(void)
* qualification. This may, however, introduce DMA
* issues (e.g. floppy DMA transfer overrun/underrun).
*/
- if (pr->power.bm_activity & cx->demotion.threshold.bm) {
+ if ((pr->power.bm_activity & 0x1) &&
+ cx->demotion.threshold.bm) {
local_irq_enable();
next_state = cx->demotion.state;
goto end;
OpenPOWER on IntegriCloud