Skip to content

Commit

Permalink
PRD: Remove secondary filter
Browse files Browse the repository at this point in the history
Change-Id: I5d719d7b2fdbfd13b77d0a383e013cb9da687c68
RTC: 159411
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38717
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com>
Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38833
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
  • Loading branch information
Brian Stegmiller authored and zane131 committed Apr 7, 2017
1 parent c4ede09 commit cf68bfd
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 166 deletions.
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2012,2015 */
/* Contributors Listed Below - COPYRIGHT 2012,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -270,7 +270,7 @@ int32_t ResolutionMap::LookUp( ResolutionList & o_list,
// function, one bit set or multiple bit set make little
// difference. In both cases, it has to do same set of actions.
// We need to treat case 0 separately. It is because we want to
// know the outcome of action of secondary filter. If secondary
// know the outcome of action of csRootCause filter. If csRootCause
// filter yields 0xdd02, we know we need to launch one more pass
// with filter turned off.
case 0:
Expand Down
23 changes: 0 additions & 23 deletions src/usr/diag/prdf/common/rule/prdfRuleMetaData.C
Expand Up @@ -1047,29 +1047,6 @@ void RuleMetaData::createGroup(Group * i_group,

// Do flags. ---

// For idea of secondary bit filter to work, it must be the first filter
// applicable on register data. To manage this, first of all, we must push
// secondary filter to group.
// We are supporting the concept of cascaded filter where one filter works
// after other in harmony. When secondary filter acts, it shall make
// all the secondary bits( which are ON ) as "DON'T CARE" during primary
// pass. So, the intent is to filter out secondary bits or in other words
// analyze only primary bits in primary pass.

if ( i_data.cv_loadChip->cv_groupFlags[i_groupId] &
Prdr::PRDR_GROUP_FILTER_SECONDARY )
{
// Add secondary filter to find out if any secondary bit
// is on.
std::vector<uint8_t> l_bits;
CreateBitString::execute(l_bits,
i_data.cv_loadChip->cv_groupSecondaryBits[i_groupId]);

FilterClass * l_filter = new SecondaryBitsFilter( l_bits );
i_group->AddFilter( l_filter, true );

}

std::vector<uint8_t> l_bits;
CreateBitString::execute(l_bits,
i_data.cv_loadChip->cv_groupCsRootCauseBits[i_groupId]);
Expand Down
2 changes: 0 additions & 2 deletions src/usr/diag/prdf/common/rule/prdrCommon.H
Expand Up @@ -86,8 +86,6 @@ namespace Prdr
PRDR_GROUP_FILTER_SINGLE_BIT = 0x1,
/** Priority Bit Filter */
PRDR_GROUP_FILTER_PRIORITY = 0x2,
/** Secondary Bit Filter */
PRDR_GROUP_FILTER_SECONDARY = 0x4,
/** CS Root Cause Filter */
PRDR_GROUP_FILTER_CS_ROOT_CAUSE = 0x8,
/** CS Root Cause Null Filter */
Expand Down
1 change: 0 additions & 1 deletion src/usr/diag/prdf/common/rule/prdrCompile.lex
Expand Up @@ -149,7 +149,6 @@ day { return PRDR_TIME_DAY; }
filter { return PRDR_FILTER; }
singlebit { return PRDR_FILTER_SINGLE_BIT; }
priority { return PRDR_FILTER_PRIORITY; }
secondarybits { return PRDR_FILTER_SECONDARY; }
cs_root_cause { return PRDR_FILTER_CS_ROOT_CAUSE; }

"\<\<" { return PRDR_OP_LEFTSHIFT; }
Expand Down
8 changes: 0 additions & 8 deletions src/usr/diag/prdf/common/rule/prdrCompile.y
Expand Up @@ -160,7 +160,6 @@ using namespace PRDR_COMPILER;

%token PRDR_FILTER_SINGLE_BIT
%token PRDR_FILTER_PRIORITY
%token PRDR_FILTER_SECONDARY
%token PRDR_FILTER_CS_ROOT_CAUSE

/* Terminal tokens for Doxygen-style comments */
Expand Down Expand Up @@ -601,13 +600,6 @@ grpfilt_item: PRDR_FILTER_PRIORITY '(' bitandlist ')'
}
;

grpfilt_item: PRDR_FILTER_SECONDARY '(' bitandlist ')'
{
$$ = new std::list<Group_Filter *>;
$$->push_back(new Group_Filter_Secondary($3));
}
;

grpfilt_item: PRDR_FILTER_CS_ROOT_CAUSE '(' bitandlist ')'
{
$$ = new std::list<Group_Filter *>;
Expand Down
28 changes: 0 additions & 28 deletions src/usr/diag/prdf/common/rule/prdrGroup.H
Expand Up @@ -46,7 +46,6 @@ class Group
public:
std::list<Expr *> cv_rules;
Expr * cv_priorityList;
Expr * cv_secondaryList;
Expr * cv_csRootCauseList;

char cv_op;
Expand All @@ -55,14 +54,12 @@ class Group

Group() :
cv_priorityList(NULL),
cv_secondaryList(NULL),
cv_csRootCauseList(NULL),
cv_op(Prdr::GROUP),
cv_flags(0),
cv_doxcomment() {};
Group(char o) :
cv_priorityList(NULL),
cv_secondaryList(NULL),
cv_csRootCauseList(NULL),
cv_op(o),
cv_flags(0),
Expand All @@ -82,12 +79,6 @@ class Group
if (NULL != i_l->cv_priorityList)
i_r->cv_priorityList = i_l->cv_priorityList;

// Set Secondary bit list.
if ( NULL != i_l->cv_secondaryList )
{
i_r->cv_secondaryList = i_l->cv_secondaryList;
}

// Set CS root cause bit list
if ( NULL != i_l->cv_csRootCauseList )
{
Expand Down Expand Up @@ -204,10 +195,6 @@ class Group
{
cv_priorityList->output( i_file );
}
if ( Prdr::PRDR_GROUP_FILTER_SECONDARY & cv_flags )
{
cv_secondaryList->output( i_file );
}
if ( Prdr::PRDR_GROUP_FILTER_CS_ROOT_CAUSE & cv_flags)
{
if ( NULL != cv_csRootCauseList )
Expand Down Expand Up @@ -265,21 +252,6 @@ class Group_Filter_Priority : public Group_Filter
Expr * iv_list;
};

class Group_Filter_Secondary : public Group_Filter
{
public:
Group_Filter_Secondary( Expr * i_list ) : iv_secList( i_list ) {};

void AddFilter( Group * i_group )
{
i_group->cv_flags |= Prdr::PRDR_GROUP_FILTER_SECONDARY;
i_group->cv_secondaryList = iv_secList;
};

private:
Expr * iv_secList;
};

class Group_Filter_CS_Root_Cause : public Group_Filter
{
public:
Expand Down
12 changes: 0 additions & 12 deletions src/usr/diag/prdf/common/rule/prdrLoadChip.C
Expand Up @@ -231,7 +231,6 @@ errlHndl_t LoadChip(UtilStream & i_stream, Chip & o_chip)
o_chip.cv_groupSize = new uint16_t[o_chip.cv_groupCount];
o_chip.cv_groupFlags = new uint8_t[o_chip.cv_groupCount];
o_chip.cv_groupPriorityBits = new Expr * [o_chip.cv_groupCount];
o_chip.cv_groupSecondaryBits = new Expr * [o_chip.cv_groupCount];
o_chip.cv_groupCsRootCauseBits = new Expr * [o_chip.cv_groupCount];
for (uint32_t i = 0; i < o_chip.cv_groupCount; i++)
{
Expand All @@ -250,17 +249,6 @@ errlHndl_t LoadChip(UtilStream & i_stream, Chip & o_chip)
o_chip.cv_groupPriorityBits[i] = nullptr;
}

//check if secondary filter has been specified
if( PRDR_GROUP_FILTER_SECONDARY & o_chip.cv_groupFlags[i] )
{
o_chip.cv_groupSecondaryBits[i] = new Expr();
ReadExpr(i_stream, *o_chip.cv_groupSecondaryBits[i]);
}
else
{
o_chip.cv_groupSecondaryBits[i] = nullptr;
}

//check if cs_root_cause filter has been specified
if( PRDR_GROUP_FILTER_CS_ROOT_CAUSE & o_chip.cv_groupFlags[i] )
{
Expand Down
7 changes: 0 additions & 7 deletions src/usr/diag/prdf/common/rule/prdrLoadChip.H
Expand Up @@ -201,7 +201,6 @@ namespace Prdr
uint16_t * cv_groupSize;
uint8_t * cv_groupFlags;
Expr ** cv_groupPriorityBits;
Expr ** cv_groupSecondaryBits;
Expr ** cv_groupCsRootCauseBits;
Expr ** cv_groups;
uint16_t cv_actionCount;
Expand All @@ -212,7 +211,6 @@ namespace Prdr
cv_ruleCount(0), cv_rules(NULL),
cv_groupCount(0), cv_groupSize(NULL),
cv_groupFlags(NULL), cv_groupPriorityBits(NULL),
cv_groupSecondaryBits(NULL),
cv_groupCsRootCauseBits(NULL), cv_groups(NULL),
cv_actionCount(0), cv_actionSize(NULL),
cv_actions(NULL)
Expand All @@ -228,9 +226,6 @@ namespace Prdr
if (NULL != cv_groupPriorityBits[i])
delete cv_groupPriorityBits[i];

if ( NULL != cv_groupSecondaryBits[i] )
delete cv_groupSecondaryBits[i];

if ( NULL != cv_groupCsRootCauseBits[i] )
delete cv_groupCsRootCauseBits[i];

Expand All @@ -241,8 +236,6 @@ namespace Prdr
if (NULL != cv_groupSize) delete[] cv_groupSize;
if (NULL != cv_groupFlags) delete[] cv_groupFlags;
if (NULL != cv_groupPriorityBits) delete[] cv_groupPriorityBits;
if ( NULL != cv_groupSecondaryBits )
delete[] cv_groupSecondaryBits;
if ( NULL != cv_groupCsRootCauseBits )
delete[] cv_groupCsRootCauseBits;
for (int i = 0; i < cv_actionCount; i++)
Expand Down
42 changes: 0 additions & 42 deletions src/usr/diag/prdf/common/util/prdfFilters.C
Expand Up @@ -184,48 +184,6 @@ bool FilterLink::Undo( BitKey & bit_list )

//------------------------------------------------------------------------------

bool SecondaryBitsFilter::Apply( BitKey & io_bitList,
STEP_CODE_DATA_STRUCT & io_sdc )
{
#define PRDF_FUNC "[SecondaryBitsFilter::Apply] "
bool l_modified = false;
do
{
// This filter should only be applied on the primary passs.
if ( !io_sdc.service_data->isPrimaryPass() ) break;

// This filter should only be applied if the primary attention type is
// CHECK_STOP.
if ( CHECK_STOP != io_sdc.service_data->getPrimaryAttnType() ) break;

// This filter should only be applied if the the secondary attention
// type is RECOVERABLE.
if ( RECOVERABLE != io_sdc.service_data->getSecondaryAttnType()) break;

//if there is no secondary bit position to flip or if no bit is set in
//bit key then let us skip this apply.
if( ( 0 == iv_secBitList.size() ) || ( 0 == io_bitList.size()) ) break;

BitKey l_key ( iv_secBitList );
io_bitList.removeBits( l_key );
l_modified = true;

if( 0 == io_bitList.size() )
{
// So, we have no primary bits on. We have one or more secondary bit
// on.
io_sdc.service_data->setSecondaryErrFlag();
}

}while(0);

return l_modified;

#undef PRDF_FUNC
}

//------------------------------------------------------------------------------

bool CsRootCauseFilter::Apply( BitKey & io_bitList,
STEP_CODE_DATA_STRUCT & io_sdc )
{
Expand Down
41 changes: 0 additions & 41 deletions src/usr/diag/prdf/common/util/prdfFilters.H
Expand Up @@ -364,47 +364,6 @@ class FilterLink: public FilterClass
inline FilterLink::FilterLink(FilterClass & f1, FilterClass & f2)
: xFilter1(f1), xFilter2(f2) {}

class SecondaryBitsFilter: public FilterClass
{

public:

/**
* @brief constructor
* @param i_bitList list of bits identified as secondary in a FIR.
* @note This filter maintains a list of bits which it
* considers it as secondary. PRDF analysis is broken in to two
* steps. The first pass is known as primary pass and second pass
* is known as secondary pass. In first pass, secondary filter
* gets activiated but in secondary pass it remains inactive.
* In primary pass, filter ignores all the secondary bits for
* analysis. If primary bits are on, due to action of
* secondary filter, primary pass ends up with return code 0xdd02.
* Inorder to make sure there are really no bits on, secondary
* pass is launched. In this pass, secondary filter doesn't
* operate so analysis continues as usual. Intention of this
* pass is to identify and analyze secondary error bits which were
* ignored during primary pass due to action of this filter.
*/
SecondaryBitsFilter( const std::vector<uint8_t> & i_bitList )
{
iv_secBitList = i_bitList;
}

/**
* @brief clears all the bits identified as secondary in the given BitKey.
* @param i_bitList bitkey on which seondary filter need to act.
* @param io_sdc reference to STEP_CODE_DATA struct.
* @return true if bit key is modified false otherwise.
*/
virtual bool Apply( BitKey & io_bitList, STEP_CODE_DATA_STRUCT & io_sdc );

private: // data

std::vector<uint8_t> iv_secBitList; // list of bit pos marked as secondary

};

class CsRootCauseFilter: public FilterClass
{
public:
Expand Down

0 comments on commit cf68bfd

Please sign in to comment.