Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136444
b: refs/heads/master
c: c2558e0
h: refs/heads/master
v: v3
  • Loading branch information
Brian Gerst authored and Tejun Heo committed Jan 18, 2009
1 parent ca914d9 commit ce7550d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 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: e7a22c1ebcc1caa8178df1819d05128bb5b45ab9
refs/heads/master: c2558e0eba66b49993e619da66c95a50a97830a3
1 change: 0 additions & 1 deletion trunk/arch/x86/include/asm/pda.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ struct x8664_pda {
offset 40!!! */
#endif
short in_bootmem; /* pda lives in bootmem */
short isidle;
} ____cacheline_aligned_in_smp;

DECLARE_PER_CPU(struct x8664_pda, __pda);
Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/x86/kernel/process_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ DEFINE_PER_CPU(struct task_struct *, current_task) = &init_task;
EXPORT_PER_CPU_SYMBOL(current_task);

DEFINE_PER_CPU(unsigned long, old_rsp);
static DEFINE_PER_CPU(unsigned char, is_idle);

unsigned long kernel_thread_flags = CLONE_VM | CLONE_UNTRACED;

Expand All @@ -80,13 +81,13 @@ EXPORT_SYMBOL_GPL(idle_notifier_unregister);

void enter_idle(void)
{
write_pda(isidle, 1);
percpu_write(is_idle, 1);
atomic_notifier_call_chain(&idle_notifier, IDLE_START, NULL);
}

static void __exit_idle(void)
{
if (test_and_clear_bit_pda(0, isidle) == 0)
if (x86_test_and_clear_bit_percpu(0, is_idle) == 0)
return;
atomic_notifier_call_chain(&idle_notifier, IDLE_END, NULL);
}
Expand Down

0 comments on commit ce7550d

Please sign in to comment.