Skip to content

Commit

Permalink
Force hb dump on VFS crashes
Browse files Browse the repository at this point in the history
Added flag to force a HB dump for most VFS crashes.
Also added a few constants in the ErrlEntry constructor to make
 the bool args more obvious.

Change-Id: I4f90ee694cece10f567df787f851dca78a895ad7
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/57272
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
dcrowell77 committed May 11, 2018
1 parent 9394f9d commit ad18149
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
10 changes: 8 additions & 2 deletions src/include/usr/errl/errlentry.H
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ class ErrlEntry
friend class ErrlTest;

public:
/** Constants to use in constructor */
static constexpr bool ADD_SW_CALLOUT = true;
static constexpr bool NO_SW_CALLOUT = false;
static constexpr bool FORCE_DUMP = true;
static constexpr bool NO_FORCE_DUMP = false;

/**
* @brief ErrlEntry constructor. Builds an error log with info
* constructed from the input.
Expand Down Expand Up @@ -137,8 +143,8 @@ public:
const uint16_t i_reasonCode,
const uint64_t i_user1 = 0,
const uint64_t i_user2 = 0,
const bool i_hbSwError = false,
const bool i_hbDump = false );
const bool i_hbSwError = ErrlEntry::NO_SW_CALLOUT,
const bool i_hbDump = ErrlEntry::NO_FORCE_DUMP );

/**
* @brief Destructor
Expand Down
24 changes: 16 additions & 8 deletions src/usr/vfs/vfsrp.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2011,2017 */
/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -222,7 +222,8 @@ errlHndl_t VfsRp::_init()
VFS::VFS_ALLOC_VMEM_FAILED, // reason Code
rc, // user1 = rc
l_pnor_info.size, // user2 = size
true /*Add HB Software Callout*/
ERRORLOG::ErrlEntry::ADD_SW_CALLOUT,
ERRORLOG::ErrlEntry::FORCE_DUMP
);
break;
}
Expand Down Expand Up @@ -274,7 +275,8 @@ void VfsRp::_vfsWatcher()
VFS::VFS_TASK_CRASHED, // reason
(uint64_t)tidRc, // tid rc
(uint64_t)childRc, // child rc
true
ERRORLOG::ErrlEntry::ADD_SW_CALLOUT,
ERRORLOG::ErrlEntry::FORCE_DUMP
);

// Message is only saved in iv_msg for messages from the kernel
Expand Down Expand Up @@ -437,7 +439,8 @@ void VfsRp::_loadUnloadMonitored(msg_t * i_msg)
VFS::VFS_TASK_CRASHED, // reason Code
(uint64_t)tidRc, // tid rc
(uint64_t)childsts, // task status
true
ERRORLOG::ErrlEntry::ADD_SW_CALLOUT,
ERRORLOG::ErrlEntry::FORCE_DUMP
);

if(childRc != NULL) // crit elog aleady generated
Expand Down Expand Up @@ -541,7 +544,8 @@ void VfsRp::_loadUnload(msg_t * i_msg)
VFS_PERMS_VMEM_FAILED, // reason Code
rc, // user1 = rc
i_msg->type, // user2
true /*Add HB Software Callout*/ );
ERRORLOG::ErrlEntry::ADD_SW_CALLOUT,
ERRORLOG::ErrlEntry::FORCE_DUMP );
}
}
else
Expand Down Expand Up @@ -574,7 +578,9 @@ void VfsRp::_loadUnload(msg_t * i_msg)
VFS::VFS_MODULE_ID, // moduleid
VFS_MODULE_DOES_NOT_EXIST, // reason Code
name[0],
name[1]
name[1],
ERRORLOG::ErrlEntry::ADD_SW_CALLOUT,
ERRORLOG::ErrlEntry::FORCE_DUMP
);
err->addProcedureCallout( HWAS::EPUB_PRC_HB_CODE,
HWAS::SRCI_PRIORITY_HIGH );
Expand Down Expand Up @@ -625,7 +631,8 @@ void VfsRp::_execMonitored(msg_t * i_msg)
VFS::VFS_TASK_CRASHED, // reason Code
(uint64_t)tidRc, // tid rc
(uint64_t)childRc, // child rc
true
ERRORLOG::ErrlEntry::ADD_SW_CALLOUT,
ERRORLOG::ErrlEntry::FORCE_DUMP
);

if(childRc != NULL) // crit elog aleady generated
Expand Down Expand Up @@ -868,7 +875,8 @@ errlHndl_t VFS::module_load_unload(const char * i_module, VfsMessages i_msgtype)
VFS::VFS_LOAD_FAILED, // reason Code
rc, // user1 = msg_sendrecv rc
i_msgtype, // user2 = message type
true /*Add HB Software Callout*/
ERRORLOG::ErrlEntry::ADD_SW_CALLOUT,
ERRORLOG::ErrlEntry::FORCE_DUMP
);
}

Expand Down

0 comments on commit ad18149

Please sign in to comment.