Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268927
b: refs/heads/master
c: e12f65f
h: refs/heads/master
i:
  268925: ba0d0fe
  268923: bed2b88
  268919: 39c4d41
  268911: 46f96c9
  268895: aee2609
  268863: 5083226
  268799: e3ba49f
v: v3
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Sep 13, 2011
1 parent 55e6f4b commit eeb58de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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: 2d21a29fb62f142b8a62496700d8d82a6a8fd783
refs/heads/master: e12f65f7a49905c013263ac522af224892aafc00
10 changes: 5 additions & 5 deletions trunk/drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
}

static int c3_cpu_count;
static DEFINE_SPINLOCK(c3_lock);
static DEFINE_RAW_SPINLOCK(c3_lock);

/**
* acpi_idle_enter_bm - enters C3 with proper BM handling
Expand Down Expand Up @@ -930,12 +930,12 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
* without doing anything.
*/
if (pr->flags.bm_check && pr->flags.bm_control) {
spin_lock(&c3_lock);
raw_spin_lock(&c3_lock);
c3_cpu_count++;
/* Disable bus master arbitration when all CPUs are in C3 */
if (c3_cpu_count == num_online_cpus())
acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 1);
spin_unlock(&c3_lock);
raw_spin_unlock(&c3_lock);
} else if (!pr->flags.bm_check) {
ACPI_FLUSH_CPU_CACHE();
}
Expand All @@ -944,10 +944,10 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,

/* Re-enable bus master arbitration */
if (pr->flags.bm_check && pr->flags.bm_control) {
spin_lock(&c3_lock);
raw_spin_lock(&c3_lock);
acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 0);
c3_cpu_count--;
spin_unlock(&c3_lock);
raw_spin_unlock(&c3_lock);
}
kt2 = ktime_get_real();
idle_time_ns = ktime_to_ns(ktime_sub(kt2, kt1));
Expand Down

0 comments on commit eeb58de

Please sign in to comment.