diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/usr/targeting/targplatutil.H | 2 | ||||
-rw-r--r-- | src/usr/isteps/istep18/establish_system_smp.C | 18 | ||||
-rwxr-xr-x | src/usr/targeting/common/xmltohb/attribute_types_hb.xml | 4 | ||||
-rw-r--r-- | src/usr/targeting/targplatutil.C | 3 |
4 files changed, 19 insertions, 8 deletions
diff --git a/src/include/usr/targeting/targplatutil.H b/src/include/usr/targeting/targplatutil.H index 531ac014a..c13f1a0a8 100644 --- a/src/include/usr/targeting/targplatutil.H +++ b/src/include/usr/targeting/targplatutil.H @@ -189,7 +189,7 @@ inline bool isThisMasterNodeTarget(const Target* const i_pTarget) * @par Detailed Description: * Checks whether the current node is the master node. If yes, returns * true to the user, else false. Master node is not determined until - * istep 18.9, so this function will return false before then except + * istep 18.9, so this function will return true before then except * in the case of a MPIPL (second pass). * * @return boolean indicating whether request was successful or not diff --git a/src/usr/isteps/istep18/establish_system_smp.C b/src/usr/isteps/istep18/establish_system_smp.C index 7430e0d9f..733e0bf47 100644 --- a/src/usr/isteps/istep18/establish_system_smp.C +++ b/src/usr/isteps/istep18/establish_system_smp.C @@ -442,14 +442,22 @@ static void set_is_master_drawer(TARGETING::EntityPath *master) const TARGETING::EntityPath::PathElement mpe = master->pathElementOfType(TARGETING::TYPE_NODE); + // get current node + TARGETING::Target *current = nullptr; + TARGETING::TargetHandleList l_nodelist; + getEncResources(l_nodelist, TARGETING::TYPE_NODE, + 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 - TARGETING::TargetHandleList l_nodelist; - getEncResources(l_nodelist, TARGETING::TYPE_NODE, - TARGETING::UTIL_FILTER_FUNCTIONAL); - assert(l_nodelist.size() == 1, "ERROR, only looking for one node."); - l_nodelist[0]->setAttr<TARGETING::ATTR_IS_MASTER_DRAWER>(1); + current->setAttr<TARGETING::ATTR_IS_MASTER_DRAWER>(1); + } + else + { + // Current node is not master, unset IS_MASTER_DRAWER + current->setAttr<TARGETING::ATTR_IS_MASTER_DRAWER>(0); } } diff --git a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml index f6aa85a0b..85e22672e 100755 --- a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml +++ b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml @@ -123,10 +123,10 @@ <description>1 = is master node, 0 = is not master node</description> <simpleType> <uint8_t> - <default>0</default> + <default>1</default> </uint8_t> </simpleType> - <persistency>volatile-zeroed</persistency> + <persistency>volatile</persistency> <readable/> <writeable/> </attribute> diff --git a/src/usr/targeting/targplatutil.C b/src/usr/targeting/targplatutil.C index 3c4369e09..45fe78ebe 100644 --- a/src/usr/targeting/targplatutil.C +++ b/src/usr/targeting/targplatutil.C @@ -113,6 +113,7 @@ void getMasterNodeTarget(Target*& o_masterNodeTarget) bool isCurrentMasterNode() { +#if 0 // Get node target TARGETING::TargetHandleList l_nodelist; getEncResources(l_nodelist, TARGETING::TYPE_NODE, @@ -121,6 +122,8 @@ bool isCurrentMasterNode() auto isMaster = l_nodelist[0]->getAttr<TARGETING::ATTR_IS_MASTER_DRAWER>(); return (isMaster == 1); +#endif + return true; } #ifndef __HOSTBOOT_RUNTIME |