diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-09-24 04:31:34 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-24 04:31:34 -0400 |
commit | e6aa0f07cb5e81a7cbeaf3be6e2101234c2f0d30 (patch) | |
tree | 77926550ac0c31b1423bcf193a4ed0ecb7fda2c1 /include/asm-x86/processor.h | |
parent | d4738792fb86600b6cb7220459d9c47e819b3580 (diff) | |
parent | 72d31053f62c4bc464c2783974926969614a8649 (diff) |
Merge commit 'v2.6.27-rc7' into x86/microcode
Diffstat (limited to 'include/asm-x86/processor.h')
-rw-r--r-- | include/asm-x86/processor.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h index 58a76f69ee31..c63a47651890 100644 --- a/include/asm-x86/processor.h +++ b/include/asm-x86/processor.h | |||
@@ -693,6 +693,29 @@ extern unsigned long boot_option_idle_override; | |||
693 | extern unsigned long idle_halt; | 693 | extern unsigned long idle_halt; |
694 | extern unsigned long idle_nomwait; | 694 | extern unsigned long idle_nomwait; |
695 | 695 | ||
696 | /* | ||
697 | * on systems with caches, caches must be flashed as the absolute | ||
698 | * last instruction before going into a suspended halt. Otherwise, | ||
699 | * dirty data can linger in the cache and become stale on resume, | ||
700 | * leading to strange errors. | ||
701 | * | ||
702 | * perform a variety of operations to guarantee that the compiler | ||
703 | * will not reorder instructions. wbinvd itself is serializing | ||
704 | * so the processor will not reorder. | ||
705 | * | ||
706 | * Systems without cache can just go into halt. | ||
707 | */ | ||
708 | static inline void wbinvd_halt(void) | ||
709 | { | ||
710 | mb(); | ||
711 | /* check for clflush to determine if wbinvd is legal */ | ||
712 | if (cpu_has_clflush) | ||
713 | asm volatile("cli; wbinvd; 1: hlt; jmp 1b" : : : "memory"); | ||
714 | else | ||
715 | while (1) | ||
716 | halt(); | ||
717 | } | ||
718 | |||
696 | extern void enable_sep_cpu(void); | 719 | extern void enable_sep_cpu(void); |
697 | extern int sysenter_setup(void); | 720 | extern int sysenter_setup(void); |
698 | 721 | ||