summaryrefslogtreecommitdiffstats
path: root/src/occ_405/amec/amec_sensors_fw.c
diff options
context:
space:
mode:
authormbroyles <mbroyles@us.ibm.com>2017-12-07 13:06:35 -0600
committerMartha Broyles <mbroyles@us.ibm.com>2017-12-11 13:01:41 -0500
commit49ea880a77890b05a7b06cdf083122acb7f15a10 (patch)
tree9b526a9d024d72c91e68b68984fabd197d9545a9 /src/occ_405/amec/amec_sensors_fw.c
parent01ae49578a8e854af3c58641cd37f4c1bfeb0fd6 (diff)
downloadtalos-occ-49ea880a77890b05a7b06cdf083122acb7f15a10.tar.gz
talos-occ-49ea880a77890b05a7b06cdf083122acb7f15a10.zip
Wait two ticks prior to un-throttling memory due to power capping
Disable 24x7 on first tick GPE exceeds tick time Only update snapshot buffer in active, observation or characterization states Change-Id: I388878623d8bb6af2dd2cb93b21bf1102d7877b9 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50658 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com>
Diffstat (limited to 'src/occ_405/amec/amec_sensors_fw.c')
-rw-r--r--src/occ_405/amec/amec_sensors_fw.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/occ_405/amec/amec_sensors_fw.c b/src/occ_405/amec/amec_sensors_fw.c
index daf9fd7..6c5a1c0 100644
--- a/src/occ_405/amec/amec_sensors_fw.c
+++ b/src/occ_405/amec/amec_sensors_fw.c
@@ -103,7 +103,6 @@ void task_gpe_timings(task_t * i_task)
static bool L_first_call = TRUE;
bool l_gpe0_idle = TRUE;
bool l_gpe1_idle = TRUE;
-
static uint8_t L_consec_trace_count[2] = {0};
gpe_gpenxiramdbg_t xsr_sprg0 = {0};
gpe_gpenxiramedr_t ir_edr = {0};
@@ -251,32 +250,27 @@ void task_gpe_timings(task_t * i_task)
{
// Reset how many consecutive ticks we were busy for.
L_busyTicks = 0;
+ L_idleTicks++;
- // If we were idle for at least 16 consecutive ticks, enable 24x7
- if( L_idleTicks >= 15 )
+ // If we were idle for a complete cycle thru all ticks, re-enable 24x7
+ if( L_idleTicks >= MAX_NUM_TICKS )
{
G_24x7_disabled = FALSE;
}
- else
- {
- L_idleTicks++;
- }
}
else
{
// Reset how many consecutive ticks we were idle for
L_idleTicks = 0;
+ L_busyTicks++;
- // If we were busy for at least 2 consecutive ticks, disable 24x7
- if( L_busyTicks >= 1 )
+ // disable 24x7 if it isn't already, this will stay disabled until we can run all
+ // ticks consecutively
+ if( !G_24x7_disabled )
{
G_24x7_disabled = TRUE;
INCREMENT_ERR_HISTORY(ERRH_24X7_DISABLED);
}
- else
- {
- L_busyTicks++;
- }
}
L_first_call = FALSE;
OpenPOWER on IntegriCloud