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 get_us_from_boot() usable from APs (assuming cache coherency). Change-Id: Ice9ece11b15bbe1a58a038cda3d299862e6f822b Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/31524 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
69a9565339
commit
187e4c4474
|
@ -125,9 +125,6 @@ static struct timestamp_table *timestamp_table_get(void)
|
|||
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 @@ void timestamp_add(enum timestamp_id id, uint64_t ts_time)
|
|||
{
|
||||
struct timestamp_table *ts_table;
|
||||
|
||||
if (!timestamp_should_run())
|
||||
return;
|
||||
|
||||
ts_table = timestamp_table_get();
|
||||
|
||||
if (!ts_table) {
|
||||
|
|
Loading…
Reference in New Issue