diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/processor_idle.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 6d1e238e2375..af9f2afd72da 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com> | 4 | * Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com> |
5 | * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com> | 5 | * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com> |
6 | * Copyright (C) 2004 Dominik Brodowski <linux@brodo.de> | 6 | * Copyright (C) 2004, 2005 Dominik Brodowski <linux@brodo.de> |
7 | * Copyright (C) 2004 Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> | 7 | * Copyright (C) 2004 Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> |
8 | * - Added processor hotplug support | 8 | * - Added processor hotplug support |
9 | * Copyright (C) 2005 Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> | 9 | * Copyright (C) 2005 Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> |
@@ -261,21 +261,15 @@ static void acpi_processor_idle(void) | |||
261 | u32 bm_status = 0; | 261 | u32 bm_status = 0; |
262 | unsigned long diff = jiffies - pr->power.bm_check_timestamp; | 262 | unsigned long diff = jiffies - pr->power.bm_check_timestamp; |
263 | 263 | ||
264 | if (diff > 32) | 264 | if (diff > 31) |
265 | diff = 32; | 265 | diff = 31; |
266 | 266 | ||
267 | while (diff) { | 267 | pr->power.bm_activity <<= diff; |
268 | /* if we didn't get called, assume there was busmaster activity */ | ||
269 | diff--; | ||
270 | if (diff) | ||
271 | pr->power.bm_activity |= 0x1; | ||
272 | pr->power.bm_activity <<= 1; | ||
273 | } | ||
274 | 268 | ||
275 | acpi_get_register(ACPI_BITREG_BUS_MASTER_STATUS, | 269 | acpi_get_register(ACPI_BITREG_BUS_MASTER_STATUS, |
276 | &bm_status, ACPI_MTX_DO_NOT_LOCK); | 270 | &bm_status, ACPI_MTX_DO_NOT_LOCK); |
277 | if (bm_status) { | 271 | if (bm_status) { |
278 | pr->power.bm_activity++; | 272 | pr->power.bm_activity |= 0x1; |
279 | acpi_set_register(ACPI_BITREG_BUS_MASTER_STATUS, | 273 | acpi_set_register(ACPI_BITREG_BUS_MASTER_STATUS, |
280 | 1, ACPI_MTX_DO_NOT_LOCK); | 274 | 1, ACPI_MTX_DO_NOT_LOCK); |
281 | } | 275 | } |
@@ -287,7 +281,7 @@ static void acpi_processor_idle(void) | |||
287 | else if (errata.piix4.bmisx) { | 281 | else if (errata.piix4.bmisx) { |
288 | if ((inb_p(errata.piix4.bmisx + 0x02) & 0x01) | 282 | if ((inb_p(errata.piix4.bmisx + 0x02) & 0x01) |
289 | || (inb_p(errata.piix4.bmisx + 0x0A) & 0x01)) | 283 | || (inb_p(errata.piix4.bmisx + 0x0A) & 0x01)) |
290 | pr->power.bm_activity++; | 284 | pr->power.bm_activity |= 0x1; |
291 | } | 285 | } |
292 | 286 | ||
293 | pr->power.bm_check_timestamp = jiffies; | 287 | pr->power.bm_check_timestamp = jiffies; |