Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17932
b: refs/heads/master
c: 2d52ede
h: refs/heads/master
v: v3
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Jan 12, 2006
1 parent e63190c commit 6c86951
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 38 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7eb903f4a5c35c8310f0aa7b0e94aae0b826d837
refs/heads/master: 2d52ede9876ba566b583f255fdc43800eea81baa
39 changes: 9 additions & 30 deletions trunk/arch/x86_64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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..
Expand All @@ -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);
}

/*
Expand Down
7 changes: 0 additions & 7 deletions trunk/include/asm-x86_64/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,13 +330,6 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,

void cpu_idle_wait(void);

/*
* disable hlt during certain critical i/o operations
*/
#define HAVE_DISABLE_HLT
void disable_hlt(void);
void enable_hlt(void);

extern unsigned long arch_align_stack(unsigned long sp);

#endif

0 comments on commit 6c86951

Please sign in to comment.