diff options
author | Ben Rafanello <brafanel@us.ibm.com> | 2015-10-15 17:02:00 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-10-19 17:14:34 -0500 |
commit | d4245526721344197a416c3e92072ea7628b22ac (patch) | |
tree | 3ccd6929be509124077b6d5e4777fc5302a5a3d2 /src/include/usr/ipmi | |
parent | 29bd2509664ce1040eb98797857d1dc76a0fa42f (diff) | |
download | talos-hostboot-d4245526721344197a416c3e92072ea7628b22ac.tar.gz talos-hostboot-d4245526721344197a416c3e92072ea7628b22ac.zip |
Race condition in IPMI-SEL thread start
This fixes a defect where we shutdown Hostboot before the SEL that
caused the shutdown is sent to the BMC.
The SEL processing of error logs is done in the background by a thread
that is only started when the first error log is committed. Due to
lack of proper synchronization, the shutdown could previously occur
before the SEL thread had fully started and registered itself in the
shutdown processing to ensure its queue was flushed.
Modified the IPMI-SEL thread start up to synchronize with a barrier
after it has completed its init actions (such as registering for
shutdown). This ensures that the thread triggering the start up does
not continue, and trigger shutdown, until the initialization is
complete.
Change-Id: Ie25a5c6e81580375fd18dfe4431660ca14f78273
CQ:SW322712
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/21270
Tested-by: Jenkins Server
Tested-by: Jenkins OP Build CI
Tested-by: Jenkins OP HW
Tested-by: FSP CI Jenkins
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/ipmi')
-rw-r--r-- | src/include/usr/ipmi/ipmisel.H | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/include/usr/ipmi/ipmisel.H b/src/include/usr/ipmi/ipmisel.H index 13f44a84b..86adb07bd 100644 --- a/src/include/usr/ipmi/ipmisel.H +++ b/src/include/usr/ipmi/ipmisel.H @@ -1,7 +1,7 @@ /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ -/* $Source: src/usr/ipmi/ipmisel.H $ */ +/* $Source: src/include/usr/ipmi/ipmisel.H $ */ /* */ /* OpenPOWER HostBoot Project */ /* */ @@ -34,6 +34,8 @@ #include <stdint.h> #include <builtins.h> #include <ipmi/ipmiif.H> +#include <sys/sync.h> + /** * @@ -248,9 +250,9 @@ class IpmiSEL /** * Thread start routine for the resource provider - * @param[in] void*, unused + * @param[in] void* instance - 'this' instance to start. */ - static void* start(void* unused); + static void* start(void* instance); /** * Default constructor @@ -277,6 +279,7 @@ class IpmiSEL void execute(void); msg_q_t iv_msgQ; //!< ipmi message queue + barrier_t iv_sync_start; //Disallow copying of this class. IpmiSEL& operator=(const IpmiSEL&); |