diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-15 14:02:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-15 14:02:52 -0400 |
commit | 0b269d8462a9f0058afb46eaee56e0732acf16c4 (patch) | |
tree | f6f5d801b0f991b34b7a71394370fc31746883bb /arch/i386/kernel/process.c | |
parent | ed75ded7dd3fdb647df4efefc5d11158e3d182be (diff) | |
parent | 9aaed2b42d00d4abb2748d72d599a8033600e2bf (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (28 commits)
ACPI: check battery status on resume for un/plug events during sleep
ACPICA: Fix incorrect handling of PCI Express Root Bridge _HID
ACPI: asus_acpi: don't printk on writing garbage to proc files
ACPI: asus_acpi: fix proc files parsing
ACPI: SCI interrupt source override
ACPI: fix printk format warnings
ACPI: fix section for CPU init functions
ACPI: update comments in motherboard.c
ACPI: acpi_pci_link_set() can allocate with either GFP_ATOMIC or GFP_KERNEL
ACPI: fix potential OOPS in power driver with CONFIG_ACPI_DEBUG
ACPI: ibm_acpi: delete obsolete documentation
ACPI: created a dedicated workqueue for notify() execution
ACPI: Remove deferred execution from global lock acquire wakeup path
MSI S270 Laptop support: backlight, wlan, bluetooth states
ACPI: EC: export ec_transaction() for msi-laptop driver
ACPI: EC: Simplify acpi_hw_low_level*() with inb()/outb().
ACPI: EC: Unify poll and interrupt gpe handlers
ACPI: EC: Unify poll and interrupt mode transaction functions
ACPI: EC: Remove unused variables and duplicated code
ACPI: EC: Remove unnecessary delay added by previous transation patch.
...
Diffstat (limited to 'arch/i386/kernel/process.c')
-rw-r--r-- | arch/i386/kernel/process.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index b0a07801d9df..57d375900afb 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c | |||
@@ -236,20 +236,28 @@ EXPORT_SYMBOL_GPL(cpu_idle_wait); | |||
236 | * We execute MONITOR against need_resched and enter optimized wait state | 236 | * We execute MONITOR against need_resched and enter optimized wait state |
237 | * through MWAIT. Whenever someone changes need_resched, we would be woken | 237 | * through MWAIT. Whenever someone changes need_resched, we would be woken |
238 | * up from MWAIT (without an IPI). | 238 | * up from MWAIT (without an IPI). |
239 | * | ||
240 | * New with Core Duo processors, MWAIT can take some hints based on CPU | ||
241 | * capability. | ||
239 | */ | 242 | */ |
240 | static void mwait_idle(void) | 243 | void mwait_idle_with_hints(unsigned long eax, unsigned long ecx) |
241 | { | 244 | { |
242 | local_irq_enable(); | 245 | if (!need_resched()) { |
243 | |||
244 | while (!need_resched()) { | ||
245 | __monitor((void *)¤t_thread_info()->flags, 0, 0); | 246 | __monitor((void *)¤t_thread_info()->flags, 0, 0); |
246 | smp_mb(); | 247 | smp_mb(); |
247 | if (need_resched()) | 248 | if (!need_resched()) |
248 | break; | 249 | __mwait(eax, ecx); |
249 | __mwait(0, 0); | ||
250 | } | 250 | } |
251 | } | 251 | } |
252 | 252 | ||
253 | /* Default MONITOR/MWAIT with no hints, used for default C1 state */ | ||
254 | static void mwait_idle(void) | ||
255 | { | ||
256 | local_irq_enable(); | ||
257 | while (!need_resched()) | ||
258 | mwait_idle_with_hints(0, 0); | ||
259 | } | ||
260 | |||
253 | void __devinit select_idle_routine(const struct cpuinfo_x86 *c) | 261 | void __devinit select_idle_routine(const struct cpuinfo_x86 *c) |
254 | { | 262 | { |
255 | if (cpu_has(c, X86_FEATURE_MWAIT)) { | 263 | if (cpu_has(c, X86_FEATURE_MWAIT)) { |