summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2012-04-19 10:54:55 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-04-20 14:12:07 -0500
commiteb910e9ed06690191f339b9cd2c34f74da030fbe (patch)
tree8f3f4a4afc0e0d63f3fc14ef925f751b68c52198
parent032380ea485888ab88e9b5fb55d7af8e04b8259b (diff)
downloadtalos-hostboot-eb910e9ed06690191f339b9cd2c34f74da030fbe.tar.gz
talos-hostboot-eb910e9ed06690191f339b9cd2c34f74da030fbe.zip
Fix weak consistency bug in cpumgr.
Change-Id: Ie0ba82a759afee2e4809924b32c7ef0fefcd0ad1 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/914 Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r--src/kernel/cpumgr.C8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/kernel/cpumgr.C b/src/kernel/cpumgr.C
index eb1ad3ac2..33290ebf1 100644
--- a/src/kernel/cpumgr.C
+++ b/src/kernel/cpumgr.C
@@ -212,12 +212,14 @@ void CpuManager::executePeriodics(cpu_t * i_cpu)
{
// set up barrier based on # cpus cv_barrier;
// TODO whatif other cpus become active?
- isync();
- cv_barrier.init(cv_cpuCount);
+ isync(); // Ensure all instructions complete before this point, so
+ // we don't get a stale shutdown_requested.
if(!cv_shutdown_requested)
{
+ cv_barrier.init(cv_cpuCount);
+ lwsync(); // Ensure barrier init is globally visible before
+ // setting defrag = true.
cv_defrag = true;
- lwsync();
}
}
}
OpenPOWER on IntegriCloud