aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/processor_idle.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/processor_idle.c')
-rw-r--r--drivers/acpi/processor_idle.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index cc978a8c00b7..3e047b89999e 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -927,7 +927,7 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
927} 927}
928 928
929static int c3_cpu_count; 929static int c3_cpu_count;
930static DEFINE_SPINLOCK(c3_lock); 930static DEFINE_RAW_SPINLOCK(c3_lock);
931 931
932/** 932/**
933 * acpi_idle_enter_bm - enters C3 with proper BM handling 933 * acpi_idle_enter_bm - enters C3 with proper BM handling
@@ -1004,12 +1004,12 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
1004 * without doing anything. 1004 * without doing anything.
1005 */ 1005 */
1006 if (pr->flags.bm_check && pr->flags.bm_control) { 1006 if (pr->flags.bm_check && pr->flags.bm_control) {
1007 spin_lock(&c3_lock); 1007 raw_spin_lock(&c3_lock);
1008 c3_cpu_count++; 1008 c3_cpu_count++;
1009 /* Disable bus master arbitration when all CPUs are in C3 */ 1009 /* Disable bus master arbitration when all CPUs are in C3 */
1010 if (c3_cpu_count == num_online_cpus()) 1010 if (c3_cpu_count == num_online_cpus())
1011 acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 1); 1011 acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 1);
1012 spin_unlock(&c3_lock); 1012 raw_spin_unlock(&c3_lock);
1013 } else if (!pr->flags.bm_check) { 1013 } else if (!pr->flags.bm_check) {
1014 ACPI_FLUSH_CPU_CACHE(); 1014 ACPI_FLUSH_CPU_CACHE();
1015 } 1015 }
@@ -1018,10 +1018,10 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
1018 1018
1019 /* Re-enable bus master arbitration */ 1019 /* Re-enable bus master arbitration */
1020 if (pr->flags.bm_check && pr->flags.bm_control) { 1020 if (pr->flags.bm_check && pr->flags.bm_control) {
1021 spin_lock(&c3_lock); 1021 raw_spin_lock(&c3_lock);
1022 acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 0); 1022 acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 0);
1023 c3_cpu_count--; 1023 c3_cpu_count--;
1024 spin_unlock(&c3_lock); 1024 raw_spin_unlock(&c3_lock);
1025 } 1025 }
1026 kt2 = ktime_get_real(); 1026 kt2 = ktime_get_real();
1027 idle_time = ktime_to_us(ktime_sub(kt2, kt1)); 1027 idle_time = ktime_to_us(ktime_sub(kt2, kt1));