diff options
author | Brian Gerst <brgerst@gmail.com> | 2009-01-18 10:38:59 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-01-18 10:38:59 -0500 |
commit | c2558e0eba66b49993e619da66c95a50a97830a3 (patch) | |
tree | 06c24e7ec0ab114da24e41e0b2107bb0cfe2d04e /arch | |
parent | e7a22c1ebcc1caa8178df1819d05128bb5b45ab9 (diff) |
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')
-rw-r--r-- | arch/x86/include/asm/pda.h | 1 | ||||
-rw-r--r-- | arch/x86/kernel/process_64.c | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/include/asm/pda.h b/arch/x86/include/asm/pda.h index b30ef6bddc43..c31ca048a901 100644 --- a/arch/x86/include/asm/pda.h +++ b/arch/x86/include/asm/pda.h | |||
@@ -23,7 +23,6 @@ struct x8664_pda { | |||
23 | offset 40!!! */ | 23 | offset 40!!! */ |
24 | #endif | 24 | #endif |
25 | short in_bootmem; /* pda lives in bootmem */ | 25 | short in_bootmem; /* pda lives in bootmem */ |
26 | short isidle; | ||
27 | } ____cacheline_aligned_in_smp; | 26 | } ____cacheline_aligned_in_smp; |
28 | 27 | ||
29 | DECLARE_PER_CPU(struct x8664_pda, __pda); | 28 | DECLARE_PER_CPU(struct x8664_pda, __pda); |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 480128918926..4523ff88a69d 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; | |||
61 | EXPORT_PER_CPU_SYMBOL(current_task); | 61 | EXPORT_PER_CPU_SYMBOL(current_task); |
62 | 62 | ||
63 | DEFINE_PER_CPU(unsigned long, old_rsp); | 63 | DEFINE_PER_CPU(unsigned long, old_rsp); |
64 | static DEFINE_PER_CPU(unsigned char, is_idle); | ||
64 | 65 | ||
65 | unsigned long kernel_thread_flags = CLONE_VM | CLONE_UNTRACED; | 66 | unsigned long kernel_thread_flags = CLONE_VM | CLONE_UNTRACED; |
66 | 67 | ||
@@ -80,13 +81,13 @@ EXPORT_SYMBOL_GPL(idle_notifier_unregister); | |||
80 | 81 | ||
81 | void enter_idle(void) | 82 | void enter_idle(void) |
82 | { | 83 | { |
83 | write_pda(isidle, 1); | 84 | percpu_write(is_idle, 1); |
84 | atomic_notifier_call_chain(&idle_notifier, IDLE_START, NULL); | 85 | atomic_notifier_call_chain(&idle_notifier, IDLE_START, NULL); |
85 | } | 86 | } |
86 | 87 | ||
87 | static void __exit_idle(void) | 88 | static void __exit_idle(void) |
88 | { | 89 | { |
89 | if (test_and_clear_bit_pda(0, isidle) == 0) | 90 | if (x86_test_and_clear_bit_percpu(0, is_idle) == 0) |
90 | return; | 91 | return; |
91 | atomic_notifier_call_chain(&idle_notifier, IDLE_END, NULL); | 92 | atomic_notifier_call_chain(&idle_notifier, IDLE_END, NULL); |
92 | } | 93 | } |