Skip to content

Commit 7722496

Browse files
Prachi Guptawghoffa
authored andcommitted
processMrw: multinode updates
-- correctly set FABRIC_TO_PHYSICAL_NODE_MAP -- FAPI_POS for node target was fixed Change-Id: I7822c8cc1a04ff9cb2b9fa9e12eb92b3fe839fe9 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/53400 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> Reviewed-by: SWATHI M. BHATTIPROLU <bhmadhur@in.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Sakethan R. Kotta <sakkotta@in.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
1 parent 7b2ee59 commit 7722496

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

src/usr/targeting/common/Targets.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ sub buildAffinity
651651
$self->{membuf_inst_num} = 0;
652652
$node++;
653653

654-
if($pos > 0)
654+
if($node > 0)
655655
{
656656
$multiNode = 1;
657657
#reset the dimm index number across nodes
@@ -669,7 +669,7 @@ sub buildAffinity
669669

670670
$self->setHuid($target, $sys_pos, $node);
671671
$self->setAttribute($target, "FAPI_NAME",$self->getFapiName($type));
672-
$self->setAttribute($target, "FAPI_POS", $pos);
672+
$self->setAttribute($target, "FAPI_POS", $node);
673673
$self->setAttribute($target, "PHYS_PATH", $node_phys);
674674
$self->setAttribute($target, "AFFINITY_PATH", $node_aff);
675675

src/usr/targeting/common/processMrw.pl

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2326,6 +2326,9 @@ sub get_max_compute_nodes
23262326
##
23272327
#Proceeed only for sys targets
23282328
##
2329+
#For fabric_node_map, we store the node's position at the node
2330+
#position's index
2331+
my @fabric_node_map = (255, 255, 255, 255, 255, 255, 255, 255);
23292332
if ($targetObj->getType($sysTarget) eq "SYS")
23302333
{
23312334
foreach my $child (@{$targetObj->getTargetChildren($sysTarget)})
@@ -2335,7 +2338,9 @@ sub get_max_compute_nodes
23352338
my $attrVal = $targetObj->getAttribute($child, "ENC_TYPE");
23362339
if ($attrVal eq "CEC")
23372340
{
2338-
$retVal++;
2341+
my $fapi_pos = $targetObj->getAttribute($child, "FAPI_POS");
2342+
$fabric_node_map[$fapi_pos] = $fapi_pos;
2343+
$retVal++;
23392344
}
23402345
}
23412346
}
@@ -2348,6 +2353,17 @@ sub get_max_compute_nodes
23482353
{
23492354
$retVal = 1;
23502355
}
2356+
2357+
#Convert array into a comma separated string
2358+
my $node_map = "";
2359+
foreach my $i (@fabric_node_map)
2360+
{
2361+
$node_map .= "$i,";
2362+
}
2363+
2364+
#remove the last comma
2365+
$node_map =~ s/.$//;
2366+
$targetObj->setAttribute($sysTarget, "FABRIC_TO_PHYSICAL_NODE_MAP", $node_map);
23512367
}
23522368
return $retVal;
23532369
}

0 commit comments

Comments
 (0)