diff options
author | Andi Kleen <ak@suse.de> | 2006-01-11 16:42:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-11 22:01:12 -0500 |
commit | 2d52ede9876ba566b583f255fdc43800eea81baa (patch) | |
tree | 07f405b7807ac54a9e091ea6054281d2c290e6c6 | |
parent | 7eb903f4a5c35c8310f0aa7b0e94aae0b826d837 (diff) |
[PATCH] x86_64: Remove enable/disable_hlt
Was only used by the floppy driver to work around some ancient
hardware bug that should never occur on any 64bit system.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/x86_64/kernel/process.c | 39 | ||||
-rw-r--r-- | include/asm-x86_64/system.h | 7 |
2 files changed, 9 insertions, 37 deletions
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 3060ed97b755..c9df991150bb 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c | |||
@@ -55,8 +55,6 @@ asmlinkage extern void ret_from_fork(void); | |||
55 | 55 | ||
56 | unsigned long kernel_thread_flags = CLONE_VM | CLONE_UNTRACED; | 56 | unsigned long kernel_thread_flags = CLONE_VM | CLONE_UNTRACED; |
57 | 57 | ||
58 | static atomic_t hlt_counter = ATOMIC_INIT(0); | ||
59 | |||
60 | unsigned long boot_option_idle_override = 0; | 58 | unsigned long boot_option_idle_override = 0; |
61 | EXPORT_SYMBOL(boot_option_idle_override); | 59 | EXPORT_SYMBOL(boot_option_idle_override); |
62 | 60 | ||
@@ -66,20 +64,6 @@ EXPORT_SYMBOL(boot_option_idle_override); | |||
66 | void (*pm_idle)(void); | 64 | void (*pm_idle)(void); |
67 | static DEFINE_PER_CPU(unsigned int, cpu_idle_state); | 65 | static DEFINE_PER_CPU(unsigned int, cpu_idle_state); |
68 | 66 | ||
69 | void disable_hlt(void) | ||
70 | { | ||
71 | atomic_inc(&hlt_counter); | ||
72 | } | ||
73 | |||
74 | EXPORT_SYMBOL(disable_hlt); | ||
75 | |||
76 | void enable_hlt(void) | ||
77 | { | ||
78 | atomic_dec(&hlt_counter); | ||
79 | } | ||
80 | |||
81 | EXPORT_SYMBOL(enable_hlt); | ||
82 | |||
83 | /* | 67 | /* |
84 | * We use this if we don't have any better | 68 | * We use this if we don't have any better |
85 | * idle routine.. | 69 | * idle routine.. |
@@ -88,21 +72,16 @@ void default_idle(void) | |||
88 | { | 72 | { |
89 | local_irq_enable(); | 73 | local_irq_enable(); |
90 | 74 | ||
91 | if (!atomic_read(&hlt_counter)) { | 75 | clear_thread_flag(TIF_POLLING_NRFLAG); |
92 | clear_thread_flag(TIF_POLLING_NRFLAG); | 76 | smp_mb__after_clear_bit(); |
93 | smp_mb__after_clear_bit(); | 77 | while (!need_resched()) { |
94 | while (!need_resched()) { | 78 | local_irq_disable(); |
95 | local_irq_disable(); | 79 | if (!need_resched()) |
96 | if (!need_resched()) | 80 | safe_halt(); |
97 | safe_halt(); | 81 | else |
98 | else | 82 | local_irq_enable(); |
99 | local_irq_enable(); | ||
100 | } | ||
101 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
102 | } else { | ||
103 | while (!need_resched()) | ||
104 | cpu_relax(); | ||
105 | } | 83 | } |
84 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
106 | } | 85 | } |
107 | 86 | ||
108 | /* | 87 | /* |
diff --git a/include/asm-x86_64/system.h b/include/asm-x86_64/system.h index b34cc2ee222b..1200ea2ea12f 100644 --- a/include/asm-x86_64/system.h +++ b/include/asm-x86_64/system.h | |||
@@ -330,13 +330,6 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, | |||
330 | 330 | ||
331 | void cpu_idle_wait(void); | 331 | void cpu_idle_wait(void); |
332 | 332 | ||
333 | /* | ||
334 | * disable hlt during certain critical i/o operations | ||
335 | */ | ||
336 | #define HAVE_DISABLE_HLT | ||
337 | void disable_hlt(void); | ||
338 | void enable_hlt(void); | ||
339 | |||
340 | extern unsigned long arch_align_stack(unsigned long sp); | 333 | extern unsigned long arch_align_stack(unsigned long sp); |
341 | 334 | ||
342 | #endif | 335 | #endif |