Skip to content

Commit

Permalink
x86: use wait_for_init_deassert in x86_64
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Glauber Costa authored and Ingo Molnar committed Apr 17, 2008
1 parent 91718e8 commit e90009b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions arch/x86/kernel/smpboot_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand All @@ -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.)
Expand Down

0 comments on commit e90009b

Please sign in to comment.