From f56ff9069eb49df30d7e99e4e67aad851a54bc7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sun, 8 Sep 2013 13:10:28 +0300 Subject: [PATCH] timestamps: Only collect from BSP CPU MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We only have one table to collect timestamps into. Change-Id: I80180fe9a05226f0351c3e66eacaf2d0cb82c924 Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/3912 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi Reviewed-by: Aaron Durbin --- src/lib/timestamp.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lib/timestamp.c b/src/lib/timestamp.c index eac33a2aff..63f17f7467 100644 --- a/src/lib/timestamp.c +++ b/src/lib/timestamp.c @@ -23,6 +23,7 @@ #include #include #include +#include #define MAX_TIMESTAMPS 30 @@ -60,6 +61,9 @@ void timestamp_add(enum timestamp_id id, tsc_t ts_time) { struct timestamp_entry *tse; + if (!boot_cpu()) + return; + if (!ts_table) { timestamp_stash(id, ts_time); return; @@ -114,6 +118,9 @@ static void timestamp_do_sync(void) void timestamp_init(tsc_t base) { + if (!boot_cpu()) + return; + #ifdef __PRE_RAM__ /* Copy of basetime, it is too early for CBMEM. */ ts_basetime = base; @@ -135,6 +142,9 @@ void timestamp_init(tsc_t base) void timestamp_sync(void) { + if (!boot_cpu()) + return; + #ifdef __PRE_RAM__ timestamp_real_init(ts_basetime); #else