From 4d81b359cd176eaa02a7db599d96300a99e5251c Mon Sep 17 00:00:00 2001 From: Glauber Costa Date: Mon, 3 Mar 2008 14:13:13 -0300 Subject: [PATCH] --- yaml --- r: 88741 b: refs/heads/master c: e90009bcc1137c51d677262417f16c00ad2ce9a9 h: refs/heads/master i: 88739: 3c9840de8102eaee127c1635f3bf871e6f8263a6 v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/smpboot_64.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index e5316e10f320..80e5fc0b4729 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 91718e8d13c23bfe0aa6fa6b730c5c33ee9771bf +refs/heads/master: e90009bcc1137c51d677262417f16c00ad2ce9a9 diff --git a/trunk/arch/x86/kernel/smpboot_64.c b/trunk/arch/x86/kernel/smpboot_64.c index 9f4935e70e72..4f6d9768648f 100644 --- a/trunk/arch/x86/kernel/smpboot_64.c +++ b/trunk/arch/x86/kernel/smpboot_64.c @@ -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.)