aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/process_64.c
diff options
context:
space:
mode:
authorBrian Gerst <brgerst@gmail.com>2009-01-19 00:38:59 +0900
committerTejun Heo <tj@kernel.org>2009-01-19 00:38:59 +0900
commitc2558e0eba66b49993e619da66c95a50a97830a3 (patch)
tree06c24e7ec0ab114da24e41e0b2107bb0cfe2d04e /arch/x86/kernel/process_64.c
parente7a22c1ebcc1caa8178df1819d05128bb5b45ab9 (diff)
downloadkernel_samsung_aries-c2558e0eba66b49993e619da66c95a50a97830a3.zip
kernel_samsung_aries-c2558e0eba66b49993e619da66c95a50a97830a3.tar.gz
kernel_samsung_aries-c2558e0eba66b49993e619da66c95a50a97830a3.tar.bz2
x86-64: Move isidle from PDA to per-cpu.
tj: s/isidle/is_idle/ Signed-off-by: Brian Gerst <brgerst@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch/x86/kernel/process_64.c')
-rw-r--r--arch/x86/kernel/process_64.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index 4801289..4523ff8 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -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;
@@ -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);
}