Skip to content

Commit

Permalink
Make HUID values node-relative
Browse files Browse the repository at this point in the history
The HUID is composed of multiple pieces:

SSSS NNNN TTTTTTTT IIIIIIIIIIIIIII

SSSS            : System instance
NNNN            : Node instance
TTTTTTTT        : Target type
IIIIIIIIIIIIIII : Instance number (relative to node contained in)

The current code correctly places the node number in the HUID
but it uses an instance value relative to the entire system,
instead of just the specific node.

Targets affected by this change are:
- Processors
- All chiplets within processors

A future change will be made to fix up the memory subsystem

Change-Id: I25f0e23832ead80e54ca3960930d83792f3a80aa
CQ:SW425239
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59276
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: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
  • Loading branch information
geissonator authored and wghoffa committed Jun 12, 2018
1 parent 4189613 commit 1c1b226
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/usr/targeting/common/Targets.pm
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,8 @@ sub buildAffinity
my $nodepos = $self->getParentNodePos($target) ;
my $proc_ordinal_id = ($nodepos * $maxInstance{$type}) + $proc;

# Ensure processor HUID is node-relative
$self->{huid_idx}->{$type} = $proc;
$self->setHuid($target, $sys_pos, $node);
$self->setAttribute($target, "FAPI_NAME", $fapi_name);
$self->setAttribute($target, "PHYS_PATH", $parent_physical);
Expand Down Expand Up @@ -1137,15 +1139,21 @@ sub setCommonAttrForChiplet

my $fapi_name = $self->getFapiName($tgt_type, $node, $proc, $pos);

#unique offset per system
my $offset = (($node * $maxInstance{"PROC"} + $proc ) * $maxInstance{$tgt_type}) + $pos;
$self->{huid_idx}->{$tgt_type} = $offset;
# Calculate a system wide offset
my $sys_offset = (($node * $maxInstance{"PROC"} + $proc ) *
$maxInstance{$tgt_type}) + $pos;

# Calculate a node specific offset
my $node_offset = ($proc * $maxInstance{$tgt_type}) + $pos;

# HUID is node based so use that offset
$self->{huid_idx}->{$tgt_type} = $node_offset;
$self->setHuid($target, $sys, $node);
$self->setAttribute($target, "FAPI_NAME", $fapi_name);
$self->setAttribute($target, "PHYS_PATH", $physical_path);
$self->setAttribute($target, "AFFINITY_PATH", $affinity_path);
$self->setAttribute($target, "ORDINAL_ID", $offset);
$self->setAttribute($target, "FAPI_POS", $offset);
$self->setAttribute($target, "ORDINAL_ID", $sys_offset);
$self->setAttribute($target, "FAPI_POS", $sys_offset);
$self->setAttribute($target, "REL_POS", $pos);

my $pervasive_parent= getPervasiveForUnit("$tgt_type$pos");
Expand Down

0 comments on commit 1c1b226

Please sign in to comment.