summaryrefslogtreecommitdiff
path: root/arch/x86_64
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-01-11 21:42:42 (GMT)
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 03:01:12 (GMT)
commit2d52ede9876ba566b583f255fdc43800eea81baa (patch)
tree07f405b7807ac54a9e091ea6054281d2c290e6c6 /arch/x86_64
parent7eb903f4a5c35c8310f0aa7b0e94aae0b826d837 (diff)
downloadlinux-fsl-qoriq-2d52ede9876ba566b583f255fdc43800eea81baa.tar.xz
[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>
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/kernel/process.c39
1 files changed, 9 insertions, 30 deletions
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c
index 3060ed9..c9df991 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);
unsigned long kernel_thread_flags = CLONE_VM | CLONE_UNTRACED;
-static atomic_t hlt_counter = ATOMIC_INIT(0);
-
unsigned long boot_option_idle_override = 0;
EXPORT_SYMBOL(boot_option_idle_override);
@@ -66,20 +64,6 @@ EXPORT_SYMBOL(boot_option_idle_override);
void (*pm_idle)(void);
static DEFINE_PER_CPU(unsigned int, cpu_idle_state);
-void disable_hlt(void)
-{
- atomic_inc(&hlt_counter);
-}
-
-EXPORT_SYMBOL(disable_hlt);
-
-void enable_hlt(void)
-{
- atomic_dec(&hlt_counter);
-}
-
-EXPORT_SYMBOL(enable_hlt);
-
/*
* We use this if we don't have any better
* idle routine..
@@ -88,21 +72,16 @@ void default_idle(void)
{
local_irq_enable();
- if (!atomic_read(&hlt_counter)) {
- clear_thread_flag(TIF_POLLING_NRFLAG);
- smp_mb__after_clear_bit();
- while (!need_resched()) {
- local_irq_disable();
- if (!need_resched())
- safe_halt();
- else
- local_irq_enable();
- }
- set_thread_flag(TIF_POLLING_NRFLAG);
- } else {
- while (!need_resched())
- cpu_relax();
+ clear_thread_flag(TIF_POLLING_NRFLAG);
+ smp_mb__after_clear_bit();
+ while (!need_resched()) {
+ local_irq_disable();
+ if (!need_resched())
+ safe_halt();
+ else
+ local_irq_enable();
}
+ set_thread_flag(TIF_POLLING_NRFLAG);
}
/*