diff options
Diffstat (limited to 'drivers/acpi/processor_idle.c')
| -rw-r--r-- | drivers/acpi/processor_idle.c | 10 | 
1 files changed, 9 insertions, 1 deletions
| diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index b1b385692f46..e9a8026d39f0 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
| @@ -76,14 +76,19 @@ static unsigned int max_cstate __read_mostly = ACPI_PROCESSOR_MAX_POWER; | |||
| 76 | module_param(max_cstate, uint, 0000); | 76 | module_param(max_cstate, uint, 0000); | 
| 77 | static unsigned int nocst __read_mostly; | 77 | static unsigned int nocst __read_mostly; | 
| 78 | module_param(nocst, uint, 0000); | 78 | module_param(nocst, uint, 0000); | 
| 79 | static int bm_check_disable __read_mostly; | ||
| 80 | module_param(bm_check_disable, uint, 0000); | ||
| 79 | 81 | ||
| 80 | static unsigned int latency_factor __read_mostly = 2; | 82 | static unsigned int latency_factor __read_mostly = 2; | 
| 81 | module_param(latency_factor, uint, 0644); | 83 | module_param(latency_factor, uint, 0644); | 
| 82 | 84 | ||
| 85 | #ifdef CONFIG_ACPI_PROCFS | ||
| 83 | static u64 us_to_pm_timer_ticks(s64 t) | 86 | static u64 us_to_pm_timer_ticks(s64 t) | 
| 84 | { | 87 | { | 
| 85 | return div64_u64(t * PM_TIMER_FREQUENCY, 1000000); | 88 | return div64_u64(t * PM_TIMER_FREQUENCY, 1000000); | 
| 86 | } | 89 | } | 
| 90 | #endif | ||
| 91 | |||
| 87 | /* | 92 | /* | 
| 88 | * IBM ThinkPad R40e crashes mysteriously when going into C2 or C3. | 93 | * IBM ThinkPad R40e crashes mysteriously when going into C2 or C3. | 
| 89 | * For now disable this. Probably a bug somewhere else. | 94 | * For now disable this. Probably a bug somewhere else. | 
| @@ -763,6 +768,9 @@ static int acpi_idle_bm_check(void) | |||
| 763 | { | 768 | { | 
| 764 | u32 bm_status = 0; | 769 | u32 bm_status = 0; | 
| 765 | 770 | ||
| 771 | if (bm_check_disable) | ||
| 772 | return 0; | ||
| 773 | |||
| 766 | acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_STATUS, &bm_status); | 774 | acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_STATUS, &bm_status); | 
| 767 | if (bm_status) | 775 | if (bm_status) | 
| 768 | acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_STATUS, 1); | 776 | acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_STATUS, 1); | 
| @@ -947,7 +955,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, | |||
| 947 | if (acpi_idle_suspend) | 955 | if (acpi_idle_suspend) | 
| 948 | return(acpi_idle_enter_c1(dev, state)); | 956 | return(acpi_idle_enter_c1(dev, state)); | 
| 949 | 957 | ||
| 950 | if (acpi_idle_bm_check()) { | 958 | if (!cx->bm_sts_skip && acpi_idle_bm_check()) { | 
| 951 | if (dev->safe_state) { | 959 | if (dev->safe_state) { | 
| 952 | dev->last_state = dev->safe_state; | 960 | dev->last_state = dev->safe_state; | 
| 953 | return dev->safe_state->enter(dev, dev->safe_state); | 961 | return dev->safe_state->enter(dev, dev->safe_state); | 
