diff options
Diffstat (limited to 'arch/x86/kernel/acpi')
-rw-r--r-- | arch/x86/kernel/acpi/cstate.c | 23 | ||||
-rw-r--r-- | arch/x86/kernel/acpi/realmode/.gitignore | 3 |
2 files changed, 23 insertions, 3 deletions
diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c index 5812404a0d4..f50e7fb2a20 100644 --- a/arch/x86/kernel/acpi/cstate.c +++ b/arch/x86/kernel/acpi/cstate.c | |||
@@ -149,6 +149,29 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu, | |||
149 | } | 149 | } |
150 | EXPORT_SYMBOL_GPL(acpi_processor_ffh_cstate_probe); | 150 | EXPORT_SYMBOL_GPL(acpi_processor_ffh_cstate_probe); |
151 | 151 | ||
152 | /* | ||
153 | * This uses new MONITOR/MWAIT instructions on P4 processors with PNI, | ||
154 | * which can obviate IPI to trigger checking of need_resched. | ||
155 | * We execute MONITOR against need_resched and enter optimized wait state | ||
156 | * through MWAIT. Whenever someone changes need_resched, we would be woken | ||
157 | * up from MWAIT (without an IPI). | ||
158 | * | ||
159 | * New with Core Duo processors, MWAIT can take some hints based on CPU | ||
160 | * capability. | ||
161 | */ | ||
162 | void mwait_idle_with_hints(unsigned long ax, unsigned long cx) | ||
163 | { | ||
164 | if (!need_resched()) { | ||
165 | if (this_cpu_has(X86_FEATURE_CLFLUSH_MONITOR)) | ||
166 | clflush((void *)¤t_thread_info()->flags); | ||
167 | |||
168 | __monitor((void *)¤t_thread_info()->flags, 0, 0); | ||
169 | smp_mb(); | ||
170 | if (!need_resched()) | ||
171 | __mwait(ax, cx); | ||
172 | } | ||
173 | } | ||
174 | |||
152 | void acpi_processor_ffh_cstate_enter(struct acpi_processor_cx *cx) | 175 | void acpi_processor_ffh_cstate_enter(struct acpi_processor_cx *cx) |
153 | { | 176 | { |
154 | unsigned int cpu = smp_processor_id(); | 177 | unsigned int cpu = smp_processor_id(); |
diff --git a/arch/x86/kernel/acpi/realmode/.gitignore b/arch/x86/kernel/acpi/realmode/.gitignore deleted file mode 100644 index 58f1f48a58f..00000000000 --- a/arch/x86/kernel/acpi/realmode/.gitignore +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | wakeup.bin | ||
2 | wakeup.elf | ||
3 | wakeup.lds | ||