From cde4990515a7a190fca7a3eb9f722f74c12acdb2 Mon Sep 17 00:00:00 2001 From: Rick Ward Date: Thu, 5 Apr 2018 17:06:58 -0500 Subject: Cleanup the fix for "zero length dump on single node systems". The attribute, IS_MASTER_DRAWER, was being set in the function host_sys_fab_iovalid_processing() (istep 18.9), unfortunately that function is not called on single node systems. Had to reverse the logic on the previous IS_MASTER_DRAWER attribute, and make it an IS_SLAVE_DRAWER attribute. The reason is that there is a limitation (bug?) which requires hb-only, volatile attributes to have a default value of zero. Change-Id: Ib27349f18b2738b405649723cdcb11e2ec919991 CQ:SW423016 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56883 CI-Ready: Richard Ward Tested-by: Jenkins Server Reviewed-by: Richard J. Knight Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Prachi Gupta Reviewed-by: William G. Hoffa --- src/usr/isteps/istep14/call_host_mpipl_service.C | 2 +- src/usr/isteps/istep18/establish_system_smp.C | 9 +++++---- src/usr/targeting/common/xmltohb/attribute_types_hb.xml | 8 ++++---- src/usr/targeting/common/xmltohb/target_types_hb.xml | 2 +- src/usr/targeting/targplatutil.C | 7 ++----- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/usr/isteps/istep14/call_host_mpipl_service.C b/src/usr/isteps/istep14/call_host_mpipl_service.C index 6a65bf308..7eb7395fb 100644 --- a/src/usr/isteps/istep14/call_host_mpipl_service.C +++ b/src/usr/isteps/istep14/call_host_mpipl_service.C @@ -65,7 +65,7 @@ void* call_host_mpipl_service (void *io_pArgs) if (!TARGETING::UTIL::isCurrentMasterNode()) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "call_host_mpipl_service cannot run on slave node, skipping"); + "call_host_mpipl_service cannot run on slave node, skipping"); } else { diff --git a/src/usr/isteps/istep18/establish_system_smp.C b/src/usr/isteps/istep18/establish_system_smp.C index 733e0bf47..90de81b8d 100644 --- a/src/usr/isteps/istep18/establish_system_smp.C +++ b/src/usr/isteps/istep18/establish_system_smp.C @@ -449,15 +449,16 @@ static void set_is_master_drawer(TARGETING::EntityPath *master) TARGETING::UTIL_FILTER_FUNCTIONAL); assert(l_nodelist.size() == 1, "ERROR, only looking for one node."); current = l_nodelist[0]; + if (pe.instance == mpe.instance) { - // Current node is master, set IS_MASTER_DRAWER - current->setAttr(1); + // Current node is master, unset IS_SLAVE_DRAWER + current->setAttr(0); } else { - // Current node is not master, unset IS_MASTER_DRAWER - current->setAttr(0); + // Current node is not master, set IS_SLAVE_DRAWER + current->setAttr(1); } } diff --git a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml index 85e22672e..972c2f01e 100755 --- a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml +++ b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml @@ -119,14 +119,14 @@ - IS_MASTER_DRAWER - 1 = is master node, 0 = is not master node + IS_SLAVE_DRAWER + 0 = is master node, 1 = is slave node - 1 + 0 - volatile + volatile-zeroed diff --git a/src/usr/targeting/common/xmltohb/target_types_hb.xml b/src/usr/targeting/common/xmltohb/target_types_hb.xml index b62ba346e..5f43f0a7a 100644 --- a/src/usr/targeting/common/xmltohb/target_types_hb.xml +++ b/src/usr/targeting/common/xmltohb/target_types_hb.xml @@ -55,7 +55,7 @@ PART_NUMBER SERIAL_NUMBER VPD_SWITCHES - IS_MASTER_DRAWER + IS_SLAVE_DRAWER diff --git a/src/usr/targeting/targplatutil.C b/src/usr/targeting/targplatutil.C index 45fe78ebe..c8054cf60 100644 --- a/src/usr/targeting/targplatutil.C +++ b/src/usr/targeting/targplatutil.C @@ -113,17 +113,14 @@ void getMasterNodeTarget(Target*& o_masterNodeTarget) bool isCurrentMasterNode() { -#if 0 // Get node target TARGETING::TargetHandleList l_nodelist; getEncResources(l_nodelist, TARGETING::TYPE_NODE, TARGETING::UTIL_FILTER_FUNCTIONAL); assert(l_nodelist.size() == 1, "ERROR, only expect one node."); - auto isMaster = l_nodelist[0]->getAttr(); + auto isSlave = l_nodelist[0]->getAttr(); - return (isMaster == 1); -#endif - return true; + return (isSlave == 0); } #ifndef __HOSTBOOT_RUNTIME -- cgit v1.2.1