Skip to content

Commit

Permalink
Only update centaur sensors if data was collected
Browse files Browse the repository at this point in the history
CQ:SW441576
Change-Id: I60b0912656372e29d57e9a8fb4cf84ec42ac729c
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/65023
Reviewed-by: Martha Broyles <mbroyles@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
  • Loading branch information
wilbryan committed Aug 24, 2018
1 parent 07f6e35 commit d84708e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
42 changes: 21 additions & 21 deletions src/occ_405/amec/amec_sensors_centaur.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ void amec_update_centaur_sensors(uint8_t i_centaur)
{
amec_update_dimm_dts_sensors(l_sensor_cache, i_centaur);
amec_update_centaur_dts_sensors(l_sensor_cache, i_centaur);
amec_perfcount_getmc(l_sensor_cache, i_centaur);
}
amec_perfcount_getmc(l_sensor_cache, i_centaur);
CLEAR_CENTAUR_UPDATED(i_centaur);
}
}
Expand Down Expand Up @@ -491,8 +491,8 @@ void amec_perfcount_getmc( CentaurMemData * i_sensor_cache,
temp32 = temp32new - g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.wr_cnt_accum;
g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.wr_cnt_accum = temp32new; // Save latest accumulator away for next time

// Read every 4 ms....to convert to 0.01 Mrps = ((4ms read * 250)/10000)
tempreg = ((temp32*25)/1000);
// Read every 8 ms....to convert to 0.01 Mrps = ((8ms read * 125)/10000)
tempreg = ((temp32*125)/10000);

g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.memwrite2ms = tempreg;

Expand All @@ -506,8 +506,8 @@ void amec_perfcount_getmc( CentaurMemData * i_sensor_cache,
temp32 = temp32new - g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.rd_cnt_accum;
g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.rd_cnt_accum = temp32new; // Save latest accumulator away for next time

// Read every 4 ms....to convert to 0.01 Mrps = ((4ms read * 250)/10000)
tempreg = ((temp32*25)/1000);
// Read every 8 ms....to convert to 0.01 Mrps = ((8ms read * 125)/10000)
tempreg = ((temp32*125)/10000);

g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.memread2ms = tempreg;

Expand Down Expand Up @@ -582,8 +582,8 @@ void amec_perfcount_getmc( CentaurMemData * i_sensor_cache,
temp32 = temp32new - g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.l4_rd_cnt_accum;
g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.l4_rd_cnt_accum = temp32new; // Save latest accumulator away for next time

// Read every 4 ms....to convert to 0.01 Mrps = ((4ms read * 250)/10000)
tempreg = ((temp32*25)/1000);
// Read every 8 ms....to convert to 0.01 Mrps = ((8ms read * 125)/10000)
tempreg = ((temp32*125)/10000);
tempreg2 = g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.memread2ms;
// Firmware workaround for hardware bug: hits - memreads ~= hits
tempreg = tempreg - tempreg2;
Expand All @@ -603,8 +603,8 @@ void amec_perfcount_getmc( CentaurMemData * i_sensor_cache,
temp32 = temp32new - g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.l4_wr_cnt_accum;
g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.l4_wr_cnt_accum = temp32new; // Save latest accumulator away for next time

// Read every 4 ms....to convert to 0.01 Mrps = ((4ms read * 250)/10000)
tempreg = ((temp32*25)/1000);
// Read every 8 ms....to convert to 0.01 Mrps = ((8ms read * 125)/10000)
tempreg = ((temp32*125)/10000);

tempreg2 = g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.memwrite2ms;
// Firmware workaround for hardware bug: hits - memwrites ~= hits
Expand All @@ -625,8 +625,8 @@ void amec_perfcount_getmc( CentaurMemData * i_sensor_cache,
temp32 = temp32new - g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.intreq_base_accum;
g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.intreq_base_accum = temp32new; // Save latest accumulator away for next time

// Read every 4 ms....to convert to 0.01 Mrps = ((4ms read * 250)/10000)
tempreg = ((temp32*25)/1000);
// Read every 8 ms....to convert to 0.01 Mrps = ((8ms read * 125)/10000)
tempreg = ((temp32*125)/10000);
g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.mirb2ms = tempreg;
sensor_update(AMECSENSOR_PORTPAIR_PTR(mirb2ms,i_centaur,i_mc_id), tempreg);

Expand All @@ -637,8 +637,8 @@ void amec_perfcount_getmc( CentaurMemData * i_sensor_cache,
temp32 = temp32new - g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.intreq_low_accum;
g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.intreq_low_accum = temp32new; // Save latest accumulator away for next time

// Read every 4 ms....to convert to 0.01 Mrps = ((4ms read * 250)/10000)
tempreg = ((temp32*25)/1000);
// Read every 8 ms....to convert to 0.01 Mrps = ((8ms read * 125)/10000)
tempreg = ((temp32*125)/10000);
g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.mirl2ms = tempreg;
sensor_update(AMECSENSOR_PORTPAIR_PTR(mirl2ms,i_centaur,i_mc_id), tempreg);

Expand All @@ -649,8 +649,8 @@ void amec_perfcount_getmc( CentaurMemData * i_sensor_cache,
temp32 = temp32new - g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.intreq_med_accum;
g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.intreq_med_accum = temp32new; // Save latest accumulator away for next time

// Read every 4 ms....to convert to 0.01 Mrps = ((4ms read * 250)/10000)
tempreg = ((temp32*25)/1000);
// Read every 8 ms....to convert to 0.01 Mrps = ((8ms read * 125)/10000)
tempreg = ((temp32*125)/10000);
g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.mirm2ms = tempreg;
sensor_update(AMECSENSOR_PORTPAIR_PTR(mirm2ms,i_centaur,i_mc_id), tempreg);

Expand All @@ -661,8 +661,8 @@ void amec_perfcount_getmc( CentaurMemData * i_sensor_cache,
temp32 = temp32new - g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.intreq_high_accum;
g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.intreq_high_accum = temp32new; // Save latest accumulator away for next time

// Read every 4 ms....to convert to 0.01 Mrps = ((4ms read * 250)/10000)
tempreg = ((temp32*25)/1000);
// Read every 8 ms....to convert to 0.01 Mrps = ((8ms read * 125)/10000)
tempreg = ((temp32*125)/10000);
g_amec->proc[0].memctl[i_centaur].centaur.portpair[i_mc_id].perf.mirh2ms = tempreg;
sensor_update(AMECSENSOR_PORTPAIR_PTR(mirh2ms,i_centaur,i_mc_id), tempreg);
}
Expand All @@ -674,8 +674,8 @@ void amec_perfcount_getmc( CentaurMemData * i_sensor_cache,
temp32 = temp32new - g_amec->proc[0].memctl[i_centaur].centaur.perf.intreq_highlatency_accum;
g_amec->proc[0].memctl[i_centaur].centaur.perf.intreq_highlatency_accum = temp32new; // Save latest accumulator away for next time

// Read every 4 ms....to convert to 0.01 Mrps = ((4ms read * 250)/10000)
tempreg = ((temp32*25)/1000);
// Read every 8 ms....to convert to 0.01 Mrps = ((8ms read * 125)/10000)
tempreg = ((temp32*125)/10000);
g_amec->proc[0].memctl[i_centaur].centaur.perf.mirc2ms = tempreg;
sensor_update((&(g_amec->proc[0].memctl[i_centaur].centaur.mirc2ms)), tempreg);

Expand All @@ -686,8 +686,8 @@ void amec_perfcount_getmc( CentaurMemData * i_sensor_cache,
temp32 = temp32new - g_amec->proc[0].memctl[i_centaur].centaur.perf.lp2exit_accum;
g_amec->proc[0].memctl[i_centaur].centaur.perf.lp2exit_accum = temp32new; // Save latest accumulator away for next time

// Read every 4 ms....to convert to 0.01 Mrps = ((4ms read * 250)/10000)
tempreg = ((temp32*25)/1000);
// Read every 8 ms....to convert to 0.01 Mrps = ((8ms read * 125)/10000)
tempreg = ((temp32*125)/10000);
g_amec->proc[0].memctl[i_centaur].centaur.perf.mlp2_2ms = tempreg;
sensor_update((&(g_amec->proc[0].memctl[i_centaur].centaur.mlp2ms)), tempreg);

Expand Down
2 changes: 1 addition & 1 deletion src/occ_405/occbuildname.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) =

#else

volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) = /*<BuildName>*/ "op_occ_180815a\0" /*</BuildName>*/ ;
volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) = /*<BuildName>*/ "op_occ_180822a\0" /*</BuildName>*/ ;

#endif
4 changes: 2 additions & 2 deletions src/occ_405/sensor/sensor_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ const sensor_info_t G_sensor_info[] =
SENS_CORE_ENTRY_SET( VOLTDROOPCNTC, "#\0",AMEC_SENSOR_TYPE_VOLTAGE, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_EVERY_16TH_TICK_HZ, AMEFP( 1, 0) ),

/* ==MemSensors== NameString Units Type Location Number Freq ScaleFactor */
SENS_MEMC_ENTRY_SET( MRDM, "GBs\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 64, -5) ),
SENS_MEMC_ENTRY_SET( MWRM, "GBs\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 64, -5) ),
SENS_MEMC_ENTRY_SET( MRDM, "GBs\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP(128, -5) ),
SENS_MEMC_ENTRY_SET( MWRM, "GBs\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP(128, -5) ),
SENS_MEMC_ENTRY_SET( MEMSPM, "%\0", AMEC_SENSOR_TYPE_UTIL, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 1, -1) ),
SENS_MEMC_ENTRY_SET( MEMSPSTATM, "%\0", AMEC_SENSOR_TYPE_UTIL, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 1, -1) ),
SENS_MEMC_ENTRY_SET( MIRCM, "eps\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 1, 0) ),
Expand Down

0 comments on commit d84708e

Please sign in to comment.