Merge branch 'shmobile' into devel
[sfrench/cifs-2.6.git] / drivers / acpi / processor_idle.c
index d0035946b6b9ad692f8ae1d2486f8a7bcd27ea8e..e9a8026d39f091444ddcf90446f008fc407cc9c8 100644 (file)
@@ -76,6 +76,8 @@ static unsigned int max_cstate __read_mostly = ACPI_PROCESSOR_MAX_POWER;
 module_param(max_cstate, uint, 0000);
 static unsigned int nocst __read_mostly;
 module_param(nocst, uint, 0000);
+static int bm_check_disable __read_mostly;
+module_param(bm_check_disable, uint, 0000);
 
 static unsigned int latency_factor __read_mostly = 2;
 module_param(latency_factor, uint, 0644);
@@ -766,6 +768,9 @@ static int acpi_idle_bm_check(void)
 {
        u32 bm_status = 0;
 
+       if (bm_check_disable)
+               return 0;
+
        acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_STATUS, &bm_status);
        if (bm_status)
                acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_STATUS, 1);
@@ -950,7 +955,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
        if (acpi_idle_suspend)
                return(acpi_idle_enter_c1(dev, state));
 
-       if (acpi_idle_bm_check()) {
+       if (!cx->bm_sts_skip && acpi_idle_bm_check()) {
                if (dev->safe_state) {
                        dev->last_state = dev->safe_state;
                        return dev->safe_state->enter(dev, dev->safe_state);