Skip to content

Commit

Permalink
Cumulus Deconfig Updates for OBUS/ABUS/XBUS
Browse files Browse the repository at this point in the history
Change-Id: Ie1badcef9185049166bc1afc5419e7d7252f2f4f
RTC: 159835
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43050
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
mderkse1 authored and dcrowell77 committed Sep 19, 2017
1 parent 57a4232 commit e561936
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 24 deletions.
10 changes: 5 additions & 5 deletions src/include/usr/hwas/common/deconfigGard.H
Expand Up @@ -710,13 +710,13 @@ public:
errlHndl_t deconfigureAssocProc();

/**
* @brief Sets iv_XABusEndpointDeconfigured
* @brief Sets iv_XAOBusEndpointDeconfigured
*
* @param[in] deconfig Allows iv_XABusEndpointDeconfigured to be set
* @param[in] deconfig Allows iv_XAOBusEndpointDeconfigured to be set
* to true/false
*
*/
void setXABusEndpointDeconfigured(bool deconfig);
void setXAOBusEndpointDeconfigured(bool deconfig);

private:

Expand All @@ -733,14 +733,14 @@ private:

/**
* @brief Flag indicating if _deconfigureTarget has deconfigured an
* x/a bus endpoint.
* x/a/o bus endpoint.
*
* Used by _invokeDeconfigureAssocProc. If true,
* _invokeDeconfigureAssocProc will execute and then call
* _deconfigureAssocProc. If false, there is no work to be done
* and _invokeDeconfigureAssocProc will break and return.
*/
bool iv_XABusEndpointDeconfigured;
bool iv_XAOBusEndpointDeconfigured;


}; // DeconfigGard
Expand Down
60 changes: 43 additions & 17 deletions src/usr/hwas/common/deconfigGard.C
Expand Up @@ -122,7 +122,7 @@ DeconfigGard & theDeconfigGard()
//******************************************************************************
DeconfigGard::DeconfigGard()
: iv_platDeconfigGard(NULL),
iv_XABusEndpointDeconfigured(false)
iv_XAOBusEndpointDeconfigured(false)
{
HWAS_DBG("DeconfigGard Constructor");
HWAS_MUTEX_INIT(iv_mutex);
Expand Down Expand Up @@ -698,7 +698,7 @@ errlHndl_t DeconfigGard::deconfigureTargetsFromGardRecordsForIpl(
continue;
}

//The system can be booted even after gardingthis resource
//The system can be booted even after garding this resource
//Apply the gard record.
l_pErr = applyGardRecord(l_pTarget, l_gardRecord);
if (l_pErr)
Expand Down Expand Up @@ -730,10 +730,11 @@ errlHndl_t DeconfigGard::deconfigureTargetsFromGardRecordsForIpl(
break;
}

if (iv_XABusEndpointDeconfigured)
if (iv_XAOBusEndpointDeconfigured)
{
// Check if Abus decofigures should be considered in algorithm
// Check if Abus deconfigures should be considered in algorithm
bool l_doAbusDeconfig = pSys->getAttr<ATTR_DO_ABUS_DECONFIG>();

// Get all functional nodes
TargetHandleList l_funcNodes;
getEncResources(l_funcNodes, TYPE_NODE, UTIL_FILTER_FUNCTIONAL);
Expand All @@ -752,9 +753,9 @@ errlHndl_t DeconfigGard::deconfigureTargetsFromGardRecordsForIpl(
}
// Set for deconfigure algorithm to run on every node even if
// no buses deconfigured (needed for multi-node systems)
setXABusEndpointDeconfigured(true);
setXAOBusEndpointDeconfigured(true);
}
setXABusEndpointDeconfigured(false);
setXAOBusEndpointDeconfigured(false);
}
}
while (0);
Expand Down Expand Up @@ -1155,16 +1156,16 @@ errlHndl_t DeconfigGard::_invokeDeconfigureAssocProc(
// then there's no work for _invokeDeconfigureAssocProc to do
// as this implies there are no deconfigured endpoints or
// processors.
if (!(iv_XABusEndpointDeconfigured))
if (!(iv_XAOBusEndpointDeconfigured))
{
HWAS_INF("_invokeDeconfigureAssocProc: No deconfigured x/a"
HWAS_INF("_invokeDeconfigureAssocProc: No deconfigured x/a/o"
" bus endpoints. Deconfiguration of "
"associated procs unnecessary.");
break;
}

// Clear flag as this function is called multiple times
iv_XABusEndpointDeconfigured = false;
iv_XAOBusEndpointDeconfigured = false;

// Get top 'starting' level target - use top level target if no
// i_node given (hostboot)
Expand Down Expand Up @@ -1834,7 +1835,30 @@ void DeconfigGard::_deconfigureByAssoc(
i_deconfigRule);
}
break;
} // TYPE_XBUS, TYPE_ABUS
} // TYPE_XBUS, TYPE_ABUS, TYPE_PSI
case TYPE_OBUS:
{
// Only deconfigure peer endpoint if OBUS set to SMP mode
if (i_target.getAttr<ATTR_OPTICS_CONFIG_MODE>() ==
OPTICS_CONFIG_MODE_SMP)
{
// Get peer endpoint target
const Target * l_pDstTarget =
i_target.getAttr<ATTR_PEER_TARGET>();

// If target is valid
if (l_pDstTarget)
{
// Deconfigure peer endpoint
HWAS_INF("_deconfigureByAssoc OBUS Peer: 0x%.8X",
get_huid(l_pDstTarget));
_deconfigureTarget(
const_cast<Target &>(*l_pDstTarget),
i_errlEid, NULL, i_deconfigRule);
}
}
break;
}
case TYPE_PORE:
{
// Get parent proc target of PORE
Expand Down Expand Up @@ -1907,6 +1931,7 @@ void DeconfigGard::_deconfigureByAssoc(
if ((isFunctional(l_parentObus)) &&
(!anyChildFunctional(*l_parentObus)))
{

_deconfigureTarget(*l_parentObus,
i_errlEid, NULL, i_deconfigRule);
_deconfigureByAssoc(*l_parentObus,
Expand Down Expand Up @@ -2034,12 +2059,13 @@ void DeconfigGard::_deconfigureTarget(

// Do any necessary Deconfigure Actions
_doDeconfigureActions(i_target); /*no effect*/ // to quiet BEAM
// If target being deconfigured is an x/a bus endpoint
// If target being deconfigured is an x/a/o bus endpoint
if ((TYPE_XBUS == i_target.getAttr<ATTR_TYPE>()) ||
(TYPE_ABUS == i_target.getAttr<ATTR_TYPE>()))
(TYPE_ABUS == i_target.getAttr<ATTR_TYPE>()) ||
(TYPE_OBUS == i_target.getAttr<ATTR_TYPE>()))
{
// Set flag indicating x/a bus endpoint deconfiguration
iv_XABusEndpointDeconfigured = true;
// Set flag indicating x/a/o bus endpoint deconfiguration
iv_XAOBusEndpointDeconfigured = true;
}
}
}
Expand Down Expand Up @@ -2720,10 +2746,10 @@ errlHndl_t DeconfigGard::_symmetryValidation(ProcInfoVector &io_procInfo)

//******************************************************************************

void DeconfigGard::setXABusEndpointDeconfigured(bool deconfig)
void DeconfigGard::setXAOBusEndpointDeconfigured(bool deconfig)
{
HWAS_INF("Set iv_XABusEndpointDeconfigured");
iv_XABusEndpointDeconfigured = deconfig;
HWAS_INF("Set iv_XAOBusEndpointDeconfigured = %d", deconfig?1:0);
iv_XAOBusEndpointDeconfigured = deconfig;
}

//*****************************************************************************
Expand Down
4 changes: 2 additions & 2 deletions src/usr/hwas/common/hwas.C
Expand Up @@ -419,7 +419,7 @@ errlHndl_t discoverTargets()

// Check for non-present Procs and if found, trigger
// DeconfigGard::_invokeDeconfigureAssocProc() to run by setting
// setXABusEndpointDeconfigured to true
// setXAOBusEndpointDeconfigured to true
PredicateCTM predProc(CLASS_CHIP, TYPE_PROC);
TargetHandleList l_procs;
targetService().getAssociated(l_procs,
Expand All @@ -437,7 +437,7 @@ errlHndl_t discoverTargets()
{
HWAS_INF("discoverTargets: Proc %.8X not present",
(*l_procsIter)->getAttr<ATTR_HUID>());
HWAS::theDeconfigGard().setXABusEndpointDeconfigured(true);
HWAS::theDeconfigGard().setXAOBusEndpointDeconfigured(true);
}
}

Expand Down

0 comments on commit e561936

Please sign in to comment.