X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fia64%2Fkernel%2Fsmp.c;h=4149a0d49c4ff0fd9010f96c67053b5ea5ced483;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=14134f2e3952ce56631850ae0670cad5f1aca62c;hpb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;p=linux-2.6.git diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c index 14134f2e3..4149a0d49 100644 --- a/arch/ia64/kernel/smp.c +++ b/arch/ia64/kernel/smp.c @@ -29,9 +29,9 @@ #include #include #include +#include #include -#include #include #include #include @@ -52,7 +52,7 @@ * Structure and data for smp_call_function(). This is designed to minimise static memory * requirements. It also looks cleaner. */ -static spinlock_t call_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED; +static __cacheline_aligned DEFINE_SPINLOCK(call_lock); struct call_data_struct { void (*func) (void *info); @@ -290,11 +290,11 @@ smp_call_function_single (int cpuid, void (*func) (void *info), void *info, int /* Wait for response */ while (atomic_read(&data.started) != cpus) - barrier(); + cpu_relax(); if (wait) while (atomic_read(&data.finished) != cpus) - barrier(); + cpu_relax(); call_data = NULL; spin_unlock_bh(&call_lock); @@ -349,11 +349,11 @@ smp_call_function (void (*func) (void *info), void *info, int nonatomic, int wai /* Wait for response */ while (atomic_read(&data.started) != cpus) - barrier(); + cpu_relax(); if (wait) while (atomic_read(&data.finished) != cpus) - barrier(); + cpu_relax(); call_data = NULL; spin_unlock(&call_lock);