Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 31449
b: refs/heads/master
c: c5ab81c
h: refs/heads/master
i:
  31447: e5c7b8c
v: v3
  • Loading branch information
Dominik Brodowski authored and Len Brown committed Jun 28, 2006
1 parent 06c839c commit 71fdae5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a3c6598f92cf27d3d201a2a5b052563148156837
refs/heads/master: c5ab81ca01ad4a8870b456f93dd2fb3d815f91d9
18 changes: 6 additions & 12 deletions trunk/drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
* Copyright (C) 2004 Dominik Brodowski <linux@brodo.de>
* Copyright (C) 2004, 2005 Dominik Brodowski <linux@brodo.de>
* Copyright (C) 2004 Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
* - Added processor hotplug support
* Copyright (C) 2005 Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Expand Down Expand Up @@ -261,21 +261,15 @@ static void acpi_processor_idle(void)
u32 bm_status = 0;
unsigned long diff = jiffies - pr->power.bm_check_timestamp;

if (diff > 32)
diff = 32;
if (diff > 31)
diff = 31;

while (diff) {
/* if we didn't get called, assume there was busmaster activity */
diff--;
if (diff)
pr->power.bm_activity |= 0x1;
pr->power.bm_activity <<= 1;
}
pr->power.bm_activity <<= diff;

acpi_get_register(ACPI_BITREG_BUS_MASTER_STATUS,
&bm_status, ACPI_MTX_DO_NOT_LOCK);
if (bm_status) {
pr->power.bm_activity++;
pr->power.bm_activity |= 0x1;
acpi_set_register(ACPI_BITREG_BUS_MASTER_STATUS,
1, ACPI_MTX_DO_NOT_LOCK);
}
Expand All @@ -287,7 +281,7 @@ static void acpi_processor_idle(void)
else if (errata.piix4.bmisx) {
if ((inb_p(errata.piix4.bmisx + 0x02) & 0x01)
|| (inb_p(errata.piix4.bmisx + 0x0A) & 0x01))
pr->power.bm_activity++;
pr->power.bm_activity |= 0x1;
}

pr->power.bm_check_timestamp = jiffies;
Expand Down

0 comments on commit 71fdae5

Please sign in to comment.