diff options
author | Brian Horton <brianh@linux.ibm.com> | 2013-05-28 16:18:47 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-05-30 13:07:07 -0500 |
commit | a9d662d90defa280bf8e3f98cd115cbb84d718b0 (patch) | |
tree | 31dc20a803cef5a357ab6e85bb90dbc997a4aed4 /src/usr/hwas | |
parent | 157c1465f7e61259533ccd52863ddb526653f104 (diff) | |
download | talos-hostboot-a9d662d90defa280bf8e3f98cd115cbb84d718b0.tar.gz talos-hostboot-a9d662d90defa280bf8e3f98cd115cbb84d718b0.zip |
fix bug in PR code to handle proc with 0 EX units.
Change-Id: If9115324a79f21fe4fdb3c3f9271d48146e77dda
RTC: 72363
Tested-by: Jenkins Server
Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwas')
-rw-r--r-- | src/usr/hwas/common/hwas.C | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/usr/hwas/common/hwas.C b/src/usr/hwas/common/hwas.C index a9ba467e4..4e04ee86e 100644 --- a/src/usr/hwas/common/hwas.C +++ b/src/usr/hwas/common/hwas.C @@ -483,19 +483,27 @@ errlHndl_t discoverTargets() targetService().getAssociated( pEXList[i], pProc, TargetService::CHILD, TargetService::ALL, &exCheckExpr); - // sort the list by ATTR_HUID to ensure that we - // start at the same place each time - std::sort(pEXList[i].begin(), pEXList[i].end(), - compareTargetHUID); + if (!pEXList[i].empty()) + { + // sort the list by ATTR_HUID to ensure that we + // start at the same place each time + std::sort(pEXList[i].begin(), pEXList[i].end(), + compareTargetHUID); - // keep a pointer into that list - pEX_it[i] = pEXList[i].begin(); + // keep a pointer into that list + pEX_it[i] = pEXList[i].begin(); + } + else + { + // this one is bad, so decrement the counters + vpdCopies--; + i--; + } // advance the outer loop as well since we're doing these // procs together ++procIdx; } // for - HWAS_DBG("procIdx %d, vpdCopies %d", procIdx, vpdCopies); // now need to find EX units that stay function, going // across the list of units for each proc we have, until @@ -503,6 +511,7 @@ errlHndl_t discoverTargets() uint8_t procs_remaining = vpdCopies; uint32_t maxEXs = avgNum * vpdCopies; uint32_t goodEXs = 0; + HWAS_DBG("vpdCopies %d maxEXs %d", vpdCopies, maxEXs); do { // now cycle thru the procs |