Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37398 )
Change subject: [WIP] monotonic_timer: Make them SMP safe ......................................................................
[WIP] monotonic_timer: Make them SMP safe
Fixes regression with commit 45ddb4344
console,boot_state: Exclude printk() from reported times
This was witnessed to cause boot regressions together with LAPIC_MONOTONIC_TIMER=y. The code in cpu/x86/lapic/apic_timer.c for timer_monotonic_get() is not SMP safe as LAPIC timers do not run as synchronised as TSCs.
TBD: Time spent in printk() for APs is now incorrect in logs.
Change-Id: I1ea2c1e7172f8ab3692b42dee3f669c5942d864a Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/console/printk.c 1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/98/37398/1
diff --git a/src/console/printk.c b/src/console/printk.c index a08dd2f..a01ae93 100644 --- a/src/console/printk.c +++ b/src/console/printk.c @@ -32,13 +32,13 @@
static void console_time_run(void) { - if (TRACK_CONSOLE_TIME) + if (TRACK_CONSOLE_TIME && boot_cpu()) timer_monotonic_get(&mt_start); }
static void console_time_stop(void) { - if (TRACK_CONSOLE_TIME) { + if (TRACK_CONSOLE_TIME && boot_cpu()) { timer_monotonic_get(&mt_stop); console_usecs += mono_time_diff_microseconds(&mt_start, &mt_stop); }