Skip to content

Commit

Permalink
Deconfig parent rollup simplified
Browse files Browse the repository at this point in the history
Create a common deconfiguration rollup to parent.
A new attribute was created to indicate when to stop
rolling up the parent branch

Change-Id: I80954081527f29bc466622d30644115a96be385f
RTC:193268
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/66444
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>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
mderkse1 authored and dcrowell77 committed Nov 9, 2018
1 parent 55c7c54 commit 2dfa56b
Show file tree
Hide file tree
Showing 7 changed files with 285 additions and 332 deletions.
36 changes: 35 additions & 1 deletion src/include/usr/hwas/common/deconfigGard.H
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <hwas/hwasPlatThread.H>

#include <targeting/common/commontargeting.H>
#include <targeting/common/targetservice.H>

class HwasGardTest;

Expand Down Expand Up @@ -639,6 +640,34 @@ private:
const DeconfigureFlags i_deconfigRule =
NOT_AT_RUNTIME);

/**
* @brief Works deconfig up the parent branch
* Handles special cases like FCO deconfig and peer targets
*
* @param[in] i_target Reference to child target
* @param[in] i_errlEid Error log EID to store in Deconfigure Record.
* @param[in] i_deconfigRule Deconfigure Runtime options
*/
void _deconfigParentAssoc(TARGETING::Target & i_target,
const uint32_t i_errlEid,
const DeconfigureFlags i_deconfigRule);

/**
* @brief This rolls up deconfigure of child to its parent level(s)
* This is called by _deconfigParentAssoc
*
* This will check the immediate affinity parent and
* deconfigure it if it has no more functional children.
* If it deconfigures, it will then try to roll up the deconfigure
* to next parent level.
*
* @param[in] i_child Reference to child target
* @param[in] i_errlEid Error log EID to store in Deconfigure Record.
* @param[in] i_deconfigRule Deconfigure Runtime options
*/
void _deconfigAffinityParent(TARGETING::Target & i_child,
const uint32_t i_errlEid,
const DeconfigureFlags i_deconfigRule);
/**
* @brief Performs Deconfigure Actions.
*
Expand Down Expand Up @@ -745,12 +774,17 @@ private:
* child is functional then returns true.
*
* @param[in] Pointer parent target id
* @param[in] Indicates what relationship the result child targets should
* have to the parent target in question
* TargetService::CHILD or TargetService::CHILD_BY_AFFINITY
*
* @return true if any child state is functional.
*
*/
bool anyChildFunctional(
TARGETING::Target & i_parent);
TARGETING::Target & i_parent,
TARGETING::TargetService::ASSOCIATION_TYPE i_type =
TARGETING::TargetService::CHILD );

/**
* @brief Return FCO state of children
Expand Down
11 changes: 10 additions & 1 deletion src/include/usr/targeting/common/utilFilter.H
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,16 @@ const Target * getParentChip( const Target * i_pChiplet );
*
* @return Parent target pointer or NULL if error
*/
Target * getParent( const Target * i_unit , TARGETING::TYPE &i_pType);
Target * getParent( const Target * i_unit , TARGETING::TYPE &i_pType );

/**
* @brief return the immediate parent target of the specified input child
*
* @parm[in] i_child, unit target used for finding the parent target
*
* @return Parent target pointer or NULL if error
*/
Target * getImmediateParentByAffinity( const Target * i_child );

/**
* @brief return the EX target of the specified input core chiplet
Expand Down
31 changes: 31 additions & 0 deletions src/usr/hwas/common/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# DeconfigGard

## Deconfigure by association path
### _deconfigByAssoc
###### Propagates the deconfigured target to its associated targets
- first deconfigures all functional children-by-containment
- checks if affinity deconfigure is allowed
- allowed if not at runtime
- always allowed for all speculative deconfigures
- always allowed if EQ, EX or CORE target
- deconfigures target's affinity children (if allowed)
- deconfigures parent's affinity path via _deconfigParentAssoc (if allowed)

### _deconfigParentAssoc
###### Works the deconfig up the parent branch (handles special cases)
- handles special cases (FCO, PEER, etc) for select target types
- If no special case, then call _deconfigAffinityParent

### _deconfigAffinityParent
###### Deconfigure parent if is has no functional children
- checks if it is allowed to rollup deconfigure to parent
- Checks base attribute: ATTR_PARENT_DECONFIG_DISABLED
- 0 = allow parent deconfigure (default)
- 1 = do not allow parent deconfigure
- Grab parent target via new utility: getImmediateParentByAffinity(childTarget)
- Checks parent is functional
- Check if parent target has a functional AFFINITY child.
- If no functional child found, then deconfigure the parent target and then call
_deconfigParentAssoc passing the parent target. We already know this parent
target has no functional children, so we just continue the deconfigure
rollup to the next level.

0 comments on commit 2dfa56b

Please sign in to comment.