summaryrefslogtreecommitdiffstats
path: root/src/usr/hwas/common/pgLogic.C
diff options
context:
space:
mode:
authorMatthew Raybuck <matthew.raybuck@ibm.com>2019-02-26 14:46:10 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-03-18 15:43:46 -0500
commit3265b62f038c0e91d0f22cde3e95f9b9076cb6fa (patch)
tree8885af5dc78eca2cccd57dfb4f8e2054c4d60f99 /src/usr/hwas/common/pgLogic.C
parente0f03516109881263fe86fc97d42d3ec6ae75155 (diff)
downloadtalos-hostboot-3265b62f038c0e91d0f22cde3e95f9b9076cb6fa.tar.gz
talos-hostboot-3265b62f038c0e91d0f22cde3e95f9b9076cb6fa.zip
Improve performance of general PG algorithm
The previous PG algorithm had several places where targets would be rechecked or modified unnecessarily. This commit restructures the PG algorithm and pulls all related code out of discoverTargets and adds it to checkPartialGoodForDescendants which will be called by discoverTargets. Change-Id: I045f17f7ac22c673633cd3d951997b2371be1b8d RTC:206066 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/72732 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: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: Ilya Smirnov <ismirno@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/hwas/common/pgLogic.C')
-rw-r--r--src/usr/hwas/common/pgLogic.C68
1 files changed, 34 insertions, 34 deletions
diff --git a/src/usr/hwas/common/pgLogic.C b/src/usr/hwas/common/pgLogic.C
index b8f32f714..2cc30944f 100644
--- a/src/usr/hwas/common/pgLogic.C
+++ b/src/usr/hwas/common/pgLogic.C
@@ -257,7 +257,9 @@ namespace PARTIAL_GOOD
if (rulesIterator == pgRules_map.end())
{
- // Target is missing from the table. Return an empty vector.
+ // Target is missing from the table. This is an error, so break
+ // out of this section of code and return the appropriate error
+ // below.
break;
}
@@ -334,41 +336,39 @@ namespace PARTIAL_GOOD
}
}
- // If o_targetPgLogic has no entries then that means that there
- // doesn't exist any PG rules for the given target or another error
- // was encountered. If no other error occurred then return the
- // the following error if applicable.
- if ((l_errl == nullptr) && (o_targetPgLogic.size() == 0))
- {
- /*@
- * @errortype
- * @severity ERRL_SEV_UNRECOVERABLE
- * @moduleid HWAS::MOD_IS_DESCENDANT_FUNCTIONAL
- * @reasoncode HWAS::RC_NO_PG_LOGIC
- * @devdesc To enforce all target types have partial good
- * rules and logic, all targets must be included
- * in the PartialGoodRulesTable. A combination
- * of target type, chip type, and chip unit
- * produced an empty set of logic for the
- * target.
- *
- * @custdesc A problem occured during IPL of the system:
- * Internal Firmware Error
- * @userdata1 target type attribute
- * @userdata2 HUID of the target
- */
- l_errl = hwasError(
- ERRL_SEV_UNRECOVERABLE,
- HWAS::MOD_IS_DESCENDANT_FUNCTIONAL,
- HWAS::RC_NO_PG_LOGIC,
- i_target->getAttr<TARGETING::ATTR_TYPE>(),
- get_huid(i_target));
-
- break;
- }
-
} while(0);
+ // If o_targetPgLogic has no entries then that means that there
+ // doesn't exist any PG rules for the given target or another error
+ // was encountered. If no other error occurred then return the
+ // the following error if applicable.
+ if ((l_errl == nullptr) && (o_targetPgLogic.size() == 0))
+ {
+ /*@
+ * @errortype
+ * @severity ERRL_SEV_UNRECOVERABLE
+ * @moduleid HWAS::MOD_FIND_RULES_FOR_TARGET
+ * @reasoncode HWAS::RC_NO_PG_LOGIC
+ * @devdesc To enforce all target types have partial good
+ * rules and logic, all targets must be included
+ * in the PartialGoodRulesTable. A combination
+ * of target type, chip type, and chip unit
+ * produced an empty set of logic for the
+ * target.
+ *
+ * @custdesc A problem occured during IPL of the system:
+ * Internal Firmware Error
+ * @userdata1 target type attribute
+ * @userdata2 HUID of the target
+ */
+ l_errl = hwasError(
+ ERRL_SEV_UNRECOVERABLE,
+ HWAS::MOD_FIND_RULES_FOR_TARGET,
+ HWAS::RC_NO_PG_LOGIC,
+ i_target->getAttr<TARGETING::ATTR_TYPE>(),
+ get_huid(i_target));
+ }
+
return l_errl;
}
OpenPOWER on IntegriCloud