aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/smpboot_64.c
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-03-03 12:13:13 -0500
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:40:57 -0400
commite90009bcc1137c51d677262417f16c00ad2ce9a9 (patch)
tree77aecc911a4ee119e2fffeca7ec60c13f5566f0c /arch/x86/kernel/smpboot_64.c
parent91718e8d13c23bfe0aa6fa6b730c5c33ee9771bf (diff)
x86: use wait_for_init_deassert in x86_64
wraps the busy loop for wait_for_init_deasserted() in a function, so smp_callin in x86_64 looks like more i386 Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/smpboot_64.c')
-rw-r--r--arch/x86/kernel/smpboot_64.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/x86/kernel/smpboot_64.c b/arch/x86/kernel/smpboot_64.c
index 9f4935e70e72..4f6d9768648f 100644
--- a/arch/x86/kernel/smpboot_64.c
+++ b/arch/x86/kernel/smpboot_64.c
@@ -100,6 +100,13 @@ static void __cpuinit smp_store_cpu_info(int id)
100 print_cpu_info(c); 100 print_cpu_info(c);
101} 101}
102 102
103static inline void wait_for_init_deassert(atomic_t *deassert)
104{
105 while (!atomic_read(deassert))
106 cpu_relax();
107 return;
108}
109
103static atomic_t init_deasserted __cpuinitdata; 110static atomic_t init_deasserted __cpuinitdata;
104 111
105/* 112/*
@@ -117,8 +124,7 @@ void __cpuinit smp_callin(void)
117 * our local APIC. We have to wait for the IPI or we'll 124 * our local APIC. We have to wait for the IPI or we'll
118 * lock up on an APIC access. 125 * lock up on an APIC access.
119 */ 126 */
120 while (!atomic_read(&init_deasserted)) 127 wait_for_init_deassert(&init_deasserted);
121 cpu_relax();
122 128
123 /* 129 /*
124 * (This works even if the APIC is not enabled.) 130 * (This works even if the APIC is not enabled.)