Kyösti Mälkki has uploaded this change for review.
timestamp: Move timestamp_should_run() call
Old location caused spurious error messages when
called from APs, where timestamp_add_now() should
do nothing.
Moving the test also makes usecs_from_boot() usable
from APs (assuming cache coherency).
Change-Id: Ice9ece11b15bbe1a58a038cda3d299862e6f822b
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
---
M src/lib/timestamp.c
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/31524/1
diff --git a/src/lib/timestamp.c b/src/lib/timestamp.c
index 6885e7b..f84b9d5 100644
--- a/src/lib/timestamp.c
+++ b/src/lib/timestamp.c
@@ -125,9 +125,6 @@
MAYBE_STATIC struct timestamp_table *ts_table = NULL;
struct timestamp_cache *ts_cache;
- if (!timestamp_should_run())
- return NULL;
-
if (ts_table != NULL)
return ts_table;
@@ -188,6 +185,9 @@
{
struct timestamp_table *ts_table;
+ if (!timestamp_should_run())
+ return;
+
ts_table = timestamp_table_get();
if (!ts_table) {
To view, visit change 31524. To unsubscribe, or for help writing mail filters, visit settings.