From 55f3850bd9042ffb07dc05669dd1c6886aeee27a Mon Sep 17 00:00:00 2001 From: Andre Marin Date: Tue, 19 Apr 2016 20:15:17 -0500 Subject: [PATCH] Fix throttle procedure & MSS attribute clean up Change-Id: I8f50d1661c82c0cddc937829158359aa129df1d8 Original-Change-Id: I7b545b65aaf9cdfea08ab2c5142898f5c971a74b Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23486 Tested-by: Jenkins Server Tested-by: Hostboot CI Reviewed-by: Louis Stermole Reviewed-by: JACOB L. HARVEY Reviewed-by: Daniel M. Crowell Reviewed-by: Brian R. Silver Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41505 Tested-by: Jenkins Server --- .../hwp/memory/p9_mss_utils_to_throttle.H | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_utils_to_throttle.H b/src/import/chips/p9/procedures/hwp/memory/p9_mss_utils_to_throttle.H index 417d7c3c672..638a3c3b890 100644 --- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_utils_to_throttle.H +++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_utils_to_throttle.H @@ -41,12 +41,12 @@ namespace mss { -enum throttle_multiplier : uint64_t +enum THROTTLE_UTILS : uint64_t { // Dram data bus utilization is 4X the address bus utilization DRAM_BUS_UTILS = 4, - PERCENT_CONVERSION = 100; -} + PERCENT_CONVERSION = 100, +}; /// /// @brief Calculate N (address operations) allowed within a window of M DRAM clocks @@ -56,10 +56,10 @@ enum throttle_multiplier : uint64_t /// inline uint32_t commands_allowed_over_clock_window(uint8_t databus_util, uint32_t num_dram_clocks) { - divisor = DRAM_BUS_UTILS * PERCENT_CONVERSION; - divident = databus_utilization * dram_clocks; - quotient = divident / divisor; - remainder = divident % divisor; + uint32_t divisor = DRAM_BUS_UTILS * PERCENT_CONVERSION; + uint32_t divident = databus_util * num_dram_clocks; + uint32_t quotient = divident / divisor; + uint32_t remainder = divident % divisor; return quotient + (remainder == 0 ? 0 : 1); }