From 8b93cb756cda7437bff13a34dba1b2754e306ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Thu, 9 Jan 2020 08:41:46 +0200 Subject: timestamps: Fix TIMESTAMPS_ON_CONSOLE behaviour MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As logging is guarded by Kconfig, increase the level from BIOS_SPEW to BIOS_INFO. The original callsite inside timestamp_add_table_entry() was also called when syncing from timestamps from .bss to CBMEM. We should not reprint the values then. Change-Id: I72ca4b6a04d8734c141a04e651fc8c23932b1f23 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/38300 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth Reviewed-by: Nico Huber Reviewed-by: Paul Menzel --- src/lib/timestamp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib') diff --git a/src/lib/timestamp.c b/src/lib/timestamp.c index 7c7210cc5a..d2206f6134 100644 --- a/src/lib/timestamp.c +++ b/src/lib/timestamp.c @@ -130,9 +130,6 @@ static void timestamp_add_table_entry(struct timestamp_table *ts_table, tse->entry_id = id; tse->entry_stamp = ts_time - ts_table->base_time; - if (CONFIG(TIMESTAMPS_ON_CONSOLE)) - printk(BIOS_SPEW, "Timestamp - %s: %llu\n", timestamp_name(id), ts_time); - if (ts_table->num_entries == ts_table->max_entries) printk(BIOS_ERR, "ERROR: Timestamp table full\n"); } @@ -152,6 +149,9 @@ void timestamp_add(enum timestamp_id id, uint64_t ts_time) } timestamp_add_table_entry(ts_table, id, ts_time); + + if (CONFIG(TIMESTAMPS_ON_CONSOLE)) + printk(BIOS_INFO, "Timestamp - %s: %llu\n", timestamp_name(id), ts_time); } void timestamp_add_now(enum timestamp_id id) -- cgit v1.2.3