提交 e90009bc 编写于 作者: G Glauber Costa 提交者: Ingo Molnar

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: NGlauber Costa <gcosta@redhat.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 91718e8d
......@@ -100,6 +100,13 @@ static void __cpuinit smp_store_cpu_info(int id)
print_cpu_info(c);
}
static inline void wait_for_init_deassert(atomic_t *deassert)
{
while (!atomic_read(deassert))
cpu_relax();
return;
}
static atomic_t init_deasserted __cpuinitdata;
/*
......@@ -117,8 +124,7 @@ void __cpuinit smp_callin(void)
* our local APIC. We have to wait for the IPI or we'll
* lock up on an APIC access.
*/
while (!atomic_read(&init_deasserted))
cpu_relax();
wait_for_init_deassert(&init_deasserted);
/*
* (This works even if the APIC is not enabled.)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册