diff options
author | Len Brown <len.brown@intel.com> | 2010-07-22 18:18:28 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-07-22 18:18:28 -0400 |
commit | 4a973f2495fba8775d1c408b3ee7f2c19b19f13f (patch) | |
tree | 302484851e44029a208cce8c79294a82f25561d9 | |
parent | be48b11573952b467676b24de87d637e33339e7d (diff) | |
parent | d3e7e99f2faf9f44ec0a3379f735b41c9173dfa1 (diff) |
Merge branch 'bugzilla-15886' into release
-rw-r--r-- | arch/x86/kernel/acpi/cstate.c | 9 | ||||
-rw-r--r-- | drivers/acpi/processor_idle.c | 7 | ||||
-rw-r--r-- | include/acpi/processor.h | 3 |
3 files changed, 17 insertions, 2 deletions
diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c index 2e837f5080fe..fb7a5f052e2b 100644 --- a/arch/x86/kernel/acpi/cstate.c +++ b/arch/x86/kernel/acpi/cstate.c | |||
@@ -145,6 +145,15 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu, | |||
145 | percpu_entry->states[cx->index].eax = cx->address; | 145 | percpu_entry->states[cx->index].eax = cx->address; |
146 | percpu_entry->states[cx->index].ecx = MWAIT_ECX_INTERRUPT_BREAK; | 146 | percpu_entry->states[cx->index].ecx = MWAIT_ECX_INTERRUPT_BREAK; |
147 | } | 147 | } |
148 | |||
149 | /* | ||
150 | * For _CST FFH on Intel, if GAS.access_size bit 1 is cleared, | ||
151 | * then we should skip checking BM_STS for this C-state. | ||
152 | * ref: "Intel Processor Vendor-Specific ACPI Interface Specification" | ||
153 | */ | ||
154 | if ((c->x86_vendor == X86_VENDOR_INTEL) && !(reg->access_size & 0x2)) | ||
155 | cx->bm_sts_skip = 1; | ||
156 | |||
148 | return retval; | 157 | return retval; |
149 | } | 158 | } |
150 | EXPORT_SYMBOL_GPL(acpi_processor_ffh_cstate_probe); | 159 | EXPORT_SYMBOL_GPL(acpi_processor_ffh_cstate_probe); |
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index b1b385692f46..1d4104855296 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -76,6 +76,8 @@ 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); |
@@ -763,6 +765,9 @@ static int acpi_idle_bm_check(void) | |||
763 | { | 765 | { |
764 | u32 bm_status = 0; | 766 | u32 bm_status = 0; |
765 | 767 | ||
768 | if (bm_check_disable) | ||
769 | return 0; | ||
770 | |||
766 | acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_STATUS, &bm_status); | 771 | acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_STATUS, &bm_status); |
767 | if (bm_status) | 772 | if (bm_status) |
768 | acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_STATUS, 1); | 773 | acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_STATUS, 1); |
@@ -947,7 +952,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, | |||
947 | if (acpi_idle_suspend) | 952 | if (acpi_idle_suspend) |
948 | return(acpi_idle_enter_c1(dev, state)); | 953 | return(acpi_idle_enter_c1(dev, state)); |
949 | 954 | ||
950 | if (acpi_idle_bm_check()) { | 955 | if (!cx->bm_sts_skip && acpi_idle_bm_check()) { |
951 | if (dev->safe_state) { | 956 | if (dev->safe_state) { |
952 | dev->last_state = dev->safe_state; | 957 | dev->last_state = dev->safe_state; |
953 | return dev->safe_state->enter(dev, dev->safe_state); | 958 | return dev->safe_state->enter(dev, dev->safe_state); |
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index da565a48240e..a68ca8a11a53 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -48,7 +48,7 @@ struct acpi_power_register { | |||
48 | u8 space_id; | 48 | u8 space_id; |
49 | u8 bit_width; | 49 | u8 bit_width; |
50 | u8 bit_offset; | 50 | u8 bit_offset; |
51 | u8 reserved; | 51 | u8 access_size; |
52 | u64 address; | 52 | u64 address; |
53 | } __attribute__ ((packed)); | 53 | } __attribute__ ((packed)); |
54 | 54 | ||
@@ -63,6 +63,7 @@ struct acpi_processor_cx { | |||
63 | u32 power; | 63 | u32 power; |
64 | u32 usage; | 64 | u32 usage; |
65 | u64 time; | 65 | u64 time; |
66 | u8 bm_sts_skip; | ||
66 | char desc[ACPI_CX_DESC_LEN]; | 67 | char desc[ACPI_CX_DESC_LEN]; |
67 | }; | 68 | }; |
68 | 69 | ||