aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel
diff options
context:
space:
mode:
authorDavid Mosberger-Tang <davidm@hpl.hp.com>2005-04-25 14:44:02 -0400
committerTony Luck <tony.luck@intel.com>2005-04-25 14:44:02 -0400
commit8297511530b0d2a281c796e738683951a59a020c (patch)
tree3ade89d674db6b0791ca72704478214d0bb56ad1 /arch/ia64/kernel
parentbf1cf98fa941fea5e630e341db4a294d531aaa3e (diff)
[IA64] add missing cpu_relax() in ITC syncing code
Call cpu_relax() in busy-waiting loops of the ITC-syncing code. Signed-off-by: David Mosberger-Tang <davidm@hpl.hp.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r--arch/ia64/kernel/smpboot.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index ca1536db3394..dbc6b610cc64 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * SMP boot-related support 2 * SMP boot-related support
3 * 3 *
4 * Copyright (C) 1998-2003 Hewlett-Packard Co 4 * Copyright (C) 1998-2003, 2005 Hewlett-Packard Co
5 * David Mosberger-Tang <davidm@hpl.hp.com> 5 * David Mosberger-Tang <davidm@hpl.hp.com>
6 * 6 *
7 * 01/05/16 Rohit Seth <rohit.seth@intel.com> Moved SMP booting functions from smp.c to here. 7 * 01/05/16 Rohit Seth <rohit.seth@intel.com> Moved SMP booting functions from smp.c to here.
@@ -156,7 +156,8 @@ sync_master (void *arg)
156 local_irq_save(flags); 156 local_irq_save(flags);
157 { 157 {
158 for (i = 0; i < NUM_ROUNDS*NUM_ITERS; ++i) { 158 for (i = 0; i < NUM_ROUNDS*NUM_ITERS; ++i) {
159 while (!go[MASTER]); 159 while (!go[MASTER])
160 cpu_relax();
160 go[MASTER] = 0; 161 go[MASTER] = 0;
161 go[SLAVE] = ia64_get_itc(); 162 go[SLAVE] = ia64_get_itc();
162 } 163 }
@@ -179,7 +180,8 @@ get_delta (long *rt, long *master)
179 for (i = 0; i < NUM_ITERS; ++i) { 180 for (i = 0; i < NUM_ITERS; ++i) {
180 t0 = ia64_get_itc(); 181 t0 = ia64_get_itc();
181 go[MASTER] = 1; 182 go[MASTER] = 1;
182 while (!(tm = go[SLAVE])); 183 while (!(tm = go[SLAVE]))
184 cpu_relax();
183 go[SLAVE] = 0; 185 go[SLAVE] = 0;
184 t1 = ia64_get_itc(); 186 t1 = ia64_get_itc();
185 187
@@ -258,7 +260,8 @@ ia64_sync_itc (unsigned int master)
258 return; 260 return;
259 } 261 }
260 262
261 while (go[MASTER]); /* wait for master to be ready */ 263 while (go[MASTER])
264 cpu_relax(); /* wait for master to be ready */
262 265
263 spin_lock_irqsave(&itc_sync_lock, flags); 266 spin_lock_irqsave(&itc_sync_lock, flags);
264 { 267 {