diff options
author | Van Lee <vanlee@us.ibm.com> | 2012-08-05 16:58:23 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-08-08 10:31:20 -0500 |
commit | cd0b187fb068213bc3fb5ae64c7385a58450eea1 (patch) | |
tree | 1bf8104fe4bbd73dad299e4b0d93cd452643b6a3 /src/usr/initservice/istepdispatcher | |
parent | 2aaf6930b74246645165bfb30070bc1b2f209156 (diff) | |
download | blackbird-hostboot-cd0b187fb068213bc3fb5ae64c7385a58450eea1.tar.gz blackbird-hostboot-cd0b187fb068213bc3fb5ae64c7385a58450eea1.zip |
Resolve a race condition between VPO script and spless task daemon
Change-Id: Ia338474246815fc1bcd1f3d1bd6ef00a6384234d
RTC: 46098
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1481
Tested-by: Jenkins Server
Reviewed-by: Mark W. Wenning <wenning@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/initservice/istepdispatcher')
-rw-r--r-- | src/usr/initservice/istepdispatcher/splesscommon.H | 2 | ||||
-rw-r--r-- | src/usr/initservice/istepdispatcher/sptask.C | 14 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/usr/initservice/istepdispatcher/splesscommon.H b/src/usr/initservice/istepdispatcher/splesscommon.H index dc3fb30b0..481b9c640 100644 --- a/src/usr/initservice/istepdispatcher/splesscommon.H +++ b/src/usr/initservice/istepdispatcher/splesscommon.H @@ -139,7 +139,7 @@ void initIStepMode( ); struct CommandHdr { bool gobit:1; - uint8_t reserved0:1; + uint8_t readbit:1; uint8_t seqnum:6; uint8_t cmdnum; diff --git a/src/usr/initservice/istepdispatcher/sptask.C b/src/usr/initservice/istepdispatcher/sptask.C index 417754412..ace618753 100644 --- a/src/usr/initservice/istepdispatcher/sptask.C +++ b/src/usr/initservice/istepdispatcher/sptask.C @@ -133,6 +133,9 @@ void userConsoleComm( void * io_msgQ ) // process any pending commands if ( l_cmd.hdr.gobit ) { + l_cmd.hdr.readbit = 1; + writeCmd( l_cmd ); + // get the sequence number from caller l_seqnum = l_cmd.hdr.seqnum; @@ -183,6 +186,12 @@ void userConsoleComm( void * io_msgQ ) // This should unblock on any message sent on the Q, l_pCurrentMsg = msg_wait( l_RecvMsgQ ); + // Clear command reg when the command is done + TRACDCOMP( g_trac_initsvc, + "userConsoleComm Clear Command reg" ); + l_cmd.val64 = 0; + writeCmd( l_cmd ); + // process returned status from IStepDisp l_sts.hdr.status = 0; @@ -230,11 +239,6 @@ void userConsoleComm( void * io_msgQ ) // Please save the following in case we have to turn this // back on. - // write the intermediate value back to the console. - TRACDCOMP( g_trac_initsvc, - "userConsoleComm Clear Command reg" ); - l_cmd.val64 = 0; - writeCmd( l_cmd ); } // endif gobit if ( l_quitflag == true ) |