summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2014-09-24 09:48:47 -0500
committerPatrick Georgi <pgeorgi@google.com>2015-03-21 17:00:34 +0100
commitad5a909740720931849a9565730209ad97ad48f5 (patch)
tree78a0cae076d4970bed3891278cc7e58168af63f8 /src
parent4869111443ce957a1603fe01fefbd4708d00b971 (diff)
downloadcoreboot-ad5a909740720931849a9565730209ad97ad48f5.tar.xz
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: I53df0adb26ae5205e2626b2995c2e1f4a97b012e Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: deab836febea72ac6715cccab4040da6f18a8149 Original-Change-Id: I7b9eb16ce10fc91bf515c5fc5a6f7c80fdb664eb Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/219711 Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Original-Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: http://review.coreboot.org/8818 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/lib/hardwaremain.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/lib/hardwaremain.c b/src/lib/hardwaremain.c
index 9917a690e7..1091c00d34 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) {}