From 28e0a7e2733d28efa4f4d77be2350b6acaa448ad Mon Sep 17 00:00:00 2001 From: Dhruvaraj S Date: Tue, 4 Aug 2015 04:30:06 -0500 Subject: Mimimum hw check during resource recovery should be at system level During the minimum hw check for resource recovery, check for the master processor or cores in master processors at system level instead of node level, current code looking at the availability in first node and doing a recovery if not available in first node. Change-Id: I527c04e4e62214f3db126ad00bab9964b4eca795 CQ:SW311913 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/19518 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: STEPHEN M. CPREK Reviewed-by: A. Patrick Williams III --- src/usr/hwas/common/hwas.C | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'src/usr/hwas/common/hwas.C') diff --git a/src/usr/hwas/common/hwas.C b/src/usr/hwas/common/hwas.C index ad187d2c6..c4f63126c 100644 --- a/src/usr/hwas/common/hwas.C +++ b/src/usr/hwas/common/hwas.C @@ -748,7 +748,7 @@ void checkCriticalResources(uint32_t & io_commonPlid, -errlHndl_t checkMinimumHardware(const TARGETING::ConstTargetHandle_t i_node, +errlHndl_t checkMinimumHardware(const TARGETING::ConstTargetHandle_t i_nodeOrSys, bool *o_bootable) { errlHndl_t l_errl = NULL; @@ -776,7 +776,7 @@ errlHndl_t checkMinimumHardware(const TARGETING::ConstTargetHandle_t i_node, // top 'starting' point - use first node if no i_node given (hostboot) Target *pTop; - if (i_node == NULL) + if (i_nodeOrSys == NULL) { Target *pSys; targetService().getTopLevelTarget(pSys); @@ -827,19 +827,29 @@ errlHndl_t checkMinimumHardware(const TARGETING::ConstTargetHandle_t i_node, // top level has at least 1 node - and it's our node. pTop = l_nodes[0]; - HWAS_INF("checkMinimumHardware: i_node = NULL, using %.8X", + HWAS_INF("checkMinimumHardware: i_nodeOrSys = NULL, using %.8X", get_huid(pTop)); } else { - pTop = const_cast(i_node); - HWAS_INF("checkMinimumHardware: i_node %.8X", + pTop = const_cast(i_nodeOrSys); + HWAS_INF("checkMinimumHardware: i_nodeOrSys %.8X", get_huid(pTop)); } // check for functional Master Proc on this node Target* l_pMasterProc = NULL; - targetService().queryMasterProcChipTargetHandle(l_pMasterProc, pTop); + + //Get master proc at system level or node level based on target type + if(pTop->getAttr() == TYPE_SYS) + { + targetService().queryMasterProcChipTargetHandle(l_pMasterProc); + } + else + { + targetService().queryMasterProcChipTargetHandle(l_pMasterProc, + pTop); + } if ((l_pMasterProc == NULL) || (!l_functional(l_pMasterProc))) { @@ -1111,7 +1121,7 @@ errlHndl_t checkMinimumHardware(const TARGETING::ConstTargetHandle_t i_node, // if there is an issue, create and commit an error, and tie it to the // the rest of them with the common plid. HWAS::checkCriticalResources(l_commonPlid, pTop); - platCheckMinimumHardware(l_commonPlid, i_node, o_bootable); + platCheckMinimumHardware(l_commonPlid, i_nodeOrSys, o_bootable); } while (0); -- cgit v1.2.1