timer: Change timer util functions to 64-bit

Since mono_time is now 64-bit, the utility functions interfacing with
mono_time should also be 64-bit so precision isn't lost.

Fixed build errors related to printing the now int64_t result of
stopwatch_duration_[m|u]secs in various places.

BUG=b:237082996
BRANCH=All
TEST=Boot dewatt

Change-Id: I169588f5e14285557f2d03270f58f4c07c0154d5
Signed-off-by: Rob Barnes <robbarnes@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66170
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
Rob Barnes
2022-09-12 06:31:47 -06:00
committed by Felix Held
parent 51249d6bed
commit d522f38c7b
25 changed files with 48 additions and 48 deletions

View File

@ -400,7 +400,7 @@ enum cb_err thread_join(struct thread_handle *handle)
while (handle->state != THREAD_DONE)
assert(thread_yield() == 0);
printk(BIOS_SPEW, "took %lu us\n", stopwatch_duration_usecs(&sw));
printk(BIOS_SPEW, "took %lld us\n", stopwatch_duration_usecs(&sw));
return handle->error;
}
@ -415,7 +415,7 @@ void thread_mutex_lock(struct thread_mutex *mutex)
assert(thread_yield() == 0);
mutex->locked = true;
printk(BIOS_SPEW, "took %lu us to acquire mutex\n", stopwatch_duration_usecs(&sw));
printk(BIOS_SPEW, "took %lld us to acquire mutex\n", stopwatch_duration_usecs(&sw));
}
void thread_mutex_unlock(struct thread_mutex *mutex)