summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormbroyles <mbroyles@us.ibm.com>2018-09-11 14:01:56 -0500
committerMartha Broyles <mbroyles@us.ibm.com>2018-09-14 13:08:30 -0500
commitb1453b6ce600d6f9879d6ebb2c30c6691a169e39 (patch)
tree9b913941fbebdb0b9d6945bc362f22e8a3f20c8e
parent0f604d61c2858821ff81c7f3028eca636800574a (diff)
downloadtalos-occ-b1453b6ce600d6f9879d6ebb2c30c6691a169e39.tar.gz
talos-occ-b1453b6ce600d6f9879d6ebb2c30c6691a169e39.zip
Include oversubscription in clip history
Change-Id: I71262d7b0490926cc2cc2e054f62d8896240fb4d Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/66003 Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com> Tested-by: Martha Broyles <mbroyles@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com>
-rwxr-xr-xsrc/occ_405/amec/amec_freq.c51
-rw-r--r--src/occ_405/amec/amec_freq.h2
-rwxr-xr-xsrc/occ_405/amec/amec_oversub.c16
3 files changed, 21 insertions, 48 deletions
diff --git a/src/occ_405/amec/amec_freq.c b/src/occ_405/amec/amec_freq.c
index f44c120..136f1b0 100755
--- a/src/occ_405/amec/amec_freq.c
+++ b/src/occ_405/amec/amec_freq.c
@@ -91,9 +91,12 @@ opal_mem_voting_reason_t G_amec_opal_mem_throt_reason = NO_MEM_THROTTLE;
//
// Name: amec_set_freq_range
//
-// Description: Set the frequency range for AMEC
-// This function will run on mode changes, cnfg_data changes
-// and oversubscription changes
+// Description: Set the frequency range for AMEC based on mode only
+// NOTE: Any other clipping of frequency should be done in
+// amec_slv_proc_voting_box() (called every tick)
+// so the CLIP history in poll response will accurately
+// show all clipping for the given mode the system is in
+// This function will run on mode changes and cnfg_data changes
//
// Thread: RealTime Loop
//
@@ -156,33 +159,6 @@ errlHndl_t amec_set_freq_range(const OCC_MODE i_mode)
}
}
- // if (redundant ps policy is being enforced)
- if (G_sysConfigData.system_type.non_redund_ps == false)
- {
- // check if need to lower max frequency due to being in oversubscription. 0 oversub freq means no freq limitation
- if( AMEC_INTF_GET_OVERSUBSCRIPTION() && (G_sysConfigData.sys_mode_freq.table[OCC_MODE_OVERSUB]) &&
- (G_sysConfigData.sys_mode_freq.table[OCC_MODE_OVERSUB] < l_freq_max) )
- {
- // If oversub is lower than system minimum then set to min
- if(G_sysConfigData.sys_mode_freq.table[OCC_MODE_OVERSUB] < l_freq_min)
- {
- TRAC_IMP("amec_set_freq_range: max frequency lowered from %u to system min %u due to oversubscription",
- l_freq_max,
- l_freq_min);
-
- l_freq_max = l_freq_min;
- }
- else
- {
- TRAC_IMP("amec_set_freq_range: max frequency lowered from %u to %u due to Oversubscription",
- l_freq_max,
- G_sysConfigData.sys_mode_freq.table[OCC_MODE_OVERSUB]);
-
- l_freq_max = G_sysConfigData.sys_mode_freq.table[OCC_MODE_OVERSUB];
- }
- }
- }
-
if( (l_freq_min == 0) || (l_freq_max == 0) )
{
// Do not update amec vars with a 0 frequency.
@@ -309,7 +285,20 @@ void amec_slv_proc_voting_box(void)
// This function implements the voting box to decide which input gets the right
// to actuate the system.
- // If there is an active VRM fault and a defined VRM N frequency less than max use it
+ // check for oversubscription if redundant ps policy (oversubscription) is being enforced
+ if (G_sysConfigData.system_type.non_redund_ps == false)
+ {
+ // If in oversubscription and there is a defined (non 0) OVERSUB frequency less than max then use it
+ if( (AMEC_INTF_GET_OVERSUBSCRIPTION()) &&
+ (G_sysConfigData.sys_mode_freq.table[OCC_MODE_OVERSUB]) &&
+ (G_sysConfigData.sys_mode_freq.table[OCC_MODE_OVERSUB] < l_chip_fmax) )
+ {
+ l_chip_fmax = G_sysConfigData.sys_mode_freq.table[OCC_MODE_OVERSUB];
+ l_chip_reason = AMEC_VOTING_REASON_OVERSUB;
+ }
+ }
+
+ // If there is an active VRM fault and a defined (non 0) VRM N frequency less than max use it
if( (g_amec->sys.vrm_fault_status) &&
(G_sysConfigData.sys_mode_freq.table[OCC_MODE_VRM_N]) &&
(G_sysConfigData.sys_mode_freq.table[OCC_MODE_VRM_N] < l_chip_fmax) )
diff --git a/src/occ_405/amec/amec_freq.h b/src/occ_405/amec/amec_freq.h
index c2db3c6..7fe8a26 100644
--- a/src/occ_405/amec/amec_freq.h
+++ b/src/occ_405/amec/amec_freq.h
@@ -69,7 +69,7 @@ typedef enum
AMEC_VOTING_REASON_CORE_CAP = 0x00000020,
AMEC_VOTING_REASON_PROC_THRM = 0x00000040,
AMEC_VOTING_REASON_GXHB_THRM = 0x00000080,
- AMEC_VOTING_REASON_RESERVED = 0x00000100, // was VRHOT, no longer used
+ AMEC_VOTING_REASON_OVERSUB = 0x00000100,
AMEC_VOTING_REASON_OVER_CURRENT = 0x00000200,
AMEC_VOTING_REASON_OVERRIDE = 0x00000400,
AMEC_VOTING_REASON_CORE_GRP_MIN = 0x00000800,
diff --git a/src/occ_405/amec/amec_oversub.c b/src/occ_405/amec/amec_oversub.c
index ff9324d..26d86b9 100755
--- a/src/occ_405/amec/amec_oversub.c
+++ b/src/occ_405/amec/amec_oversub.c
@@ -178,14 +178,6 @@ void amec_oversub_check(void)
// Commit Error
commitErrl(&l_errl);
-
- // set max frequency for oversubscription
- l_errl = amec_set_freq_range(CURRENT_MODE());
- if(l_errl)
- {
- TRAC_ERR("amec_oversub_check: committing error reported by amec_set_freq_range");
- commitErrl( &l_errl);
- }
}
}
else
@@ -194,14 +186,6 @@ void amec_oversub_check(void)
{
L_prev_ovs_state = FALSE;
TRAC_IMP("Oversubscription condition cleared");
-
- // re-set max frequency since no longer in oversubscription
- l_errl = amec_set_freq_range(CURRENT_MODE());
- if(l_errl)
- {
- TRAC_ERR("amec_oversub_check: committing error reported by amec_set_freq_range");
- commitErrl( &l_errl);
- }
}
}
OpenPOWER on IntegriCloud