[coreboot-gerrit] New patch to review for coreboot: a86b564 ramstage: remove rela_time use

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Fri Mar 20 13:05:56 CET 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8813

-gerrit

commit a86b5647836a120da76f6d14146ed4766e27174d
Author: Aaron Durbin <adurbin at chromium.org>
Date:   Wed Sep 24 09:48:47 2014 -0500

    ramstage: remove rela_time use
    
    mono_time_diff_microseconds() is sufficient for determining
    the microsecond duration between 2 monotonic counts.
    
    BUG=None
    BRANCH=None
    TEST=Built and booted. Bootstate timings still work.
    
    Change-Id: I7b9eb16ce10fc91bf515c5fc5a6f7c80fdb664eb
    Signed-off-by: Aaron Durbin <adurbin at chromium.org>
    Reviewed-on: https://chromium-review.googlesource.com/219711
    Reviewed-by: Duncan Laurie <dlaurie at chromium.org>
    Reviewed-by: Furquan Shaikh <furquan at chromium.org>
---
 src/lib/hardwaremain.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/src/lib/hardwaremain.c b/src/lib/hardwaremain.c
index 32162eb..b62a4ad 100644
--- a/src/lib/hardwaremain.c
+++ b/src/lib/hardwaremain.c
@@ -266,21 +266,17 @@ static void bs_sample_time(struct boot_state *state)
 
 static void bs_report_time(struct boot_state *state)
 {
-	struct rela_time entry_time;
-	struct rela_time run_time;
-	struct rela_time exit_time;
-	struct boot_state_times *times;
+	long entry_time;
+	long run_time;
+	long exit_time;
+	struct mono_time *samples = &state->times.samples[0];
 
-	times = &state->times;
-	entry_time = mono_time_diff(&times->samples[0], &times->samples[1]);
-	run_time = mono_time_diff(&times->samples[1], &times->samples[2]);
-	exit_time = mono_time_diff(&times->samples[2], &times->samples[3]);
+	entry_time = mono_time_diff_microseconds(&samples[0], &samples[1]);
+	run_time = mono_time_diff_microseconds(&samples[1], &samples[2]);
+	exit_time = mono_time_diff_microseconds(&samples[2], &samples[3]);
 
 	printk(BIOS_DEBUG, "BS: %s times (us): entry %ld run %ld exit %ld\n",
-	       state->name,
-	       rela_time_in_microseconds(&entry_time),
-	       rela_time_in_microseconds(&run_time),
-	       rela_time_in_microseconds(&exit_time));
+	       state->name, entry_time, run_time, exit_time);
 }
 #else
 static inline void bs_sample_time(struct boot_state *state) {}



More information about the coreboot-gerrit mailing list