diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-09-04 07:02:35 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-04 07:02:35 -0400 |
commit | 42390cdec5f6e6e2ee54f308474a6ef7dd16aa5c (patch) | |
tree | e9684c84f53272319a5acd4b9c86503f30274a51 /include/asm-x86/processor.h | |
parent | 11c231a962c740b3216eb6565149ae5a7944cba7 (diff) | |
parent | d210baf53b699fc61aa891c177b71d7082d3b957 (diff) |
Merge branch 'linus' into x86/x2apic
Conflicts:
arch/x86/kernel/cpu/cyrix.c
include/asm-x86/cpufeature.h
Signed-off-by: Ingo Molnar <mingo@elte.hu>
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 79338fe965d2..d2bf5fe8f4ff 100644 --- a/include/asm-x86/processor.h +++ b/include/asm-x86/processor.h | |||
@@ -729,6 +729,29 @@ extern unsigned long boot_option_idle_override; | |||
729 | extern unsigned long idle_halt; | 729 | extern unsigned long idle_halt; |
730 | extern unsigned long idle_nomwait; | 730 | extern unsigned long idle_nomwait; |
731 | 731 | ||
732 | /* | ||
733 | * on systems with caches, caches must be flashed as the absolute | ||
734 | * last instruction before going into a suspended halt. Otherwise, | ||
735 | * dirty data can linger in the cache and become stale on resume, | ||
736 | * leading to strange errors. | ||
737 | * | ||
738 | * perform a variety of operations to guarantee that the compiler | ||
739 | * will not reorder instructions. wbinvd itself is serializing | ||
740 | * so the processor will not reorder. | ||
741 | * | ||
742 | * Systems without cache can just go into halt. | ||
743 | */ | ||
744 | static inline void wbinvd_halt(void) | ||
745 | { | ||
746 | mb(); | ||
747 | /* check for clflush to determine if wbinvd is legal */ | ||
748 | if (cpu_has_clflush) | ||
749 | asm volatile("cli; wbinvd; 1: hlt; jmp 1b" : : : "memory"); | ||
750 | else | ||
751 | while (1) | ||
752 | halt(); | ||
753 | } | ||
754 | |||
732 | extern void enable_sep_cpu(void); | 755 | extern void enable_sep_cpu(void); |
733 | extern int sysenter_setup(void); | 756 | extern int sysenter_setup(void); |
734 | 757 | ||