From d522f38c7bfccdc4af71bcad133aec20096f3f6c Mon Sep 17 00:00:00 2001 From: Rob Barnes Date: Mon, 12 Sep 2022 06:31:47 -0600 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66170 Tested-by: build bot (Jenkins) Reviewed-by: Werner Zeh Reviewed-by: Raul Rangel Reviewed-by: Yu-Ping Wu --- src/cpu/x86/mp_init.c | 2 +- src/drivers/i2c/tpm/cr50.c | 4 ++-- src/drivers/spi/spi_flash.c | 2 +- src/drivers/spi/tpm/tpm.c | 4 ++-- src/ec/google/chromeec/ec.c | 4 ++-- src/include/timer.h | 24 +++++++++---------- src/lib/hardwaremain.c | 2 +- src/lib/thread.c | 4 ++-- src/mainboard/google/fizz/mainboard.c | 2 +- .../hatch/variants/baseboard/mainboard.c | 2 +- src/security/vboot/ec_sync.c | 8 +++---- src/soc/amd/common/block/smu/smu.c | 2 +- src/soc/intel/apollolake/chip.c | 2 +- src/soc/intel/apollolake/reset.c | 2 +- src/soc/intel/apollolake/xdci.c | 2 +- src/soc/intel/common/block/cse/cse.c | 4 ++-- src/soc/intel/elkhartlake/tsn_gbe.c | 2 +- src/soc/mediatek/common/mcu.c | 2 +- src/soc/mediatek/common/memory.c | 8 +++---- src/soc/mediatek/common/mt6359p.c | 2 +- src/soc/mediatek/common/spm.c | 2 +- src/soc/mediatek/mt8183/spm.c | 4 ++-- src/soc/nvidia/tegra210/ccplex.c | 2 +- src/soc/samsung/exynos5250/fb.c | 2 +- src/southbridge/intel/bd82x6x/me_common.c | 2 +- 25 files changed, 48 insertions(+), 48 deletions(-) diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c index 3f80694533..0d9cd418e8 100644 --- a/src/cpu/x86/mp_init.c +++ b/src/cpu/x86/mp_init.c @@ -525,7 +525,7 @@ static enum cb_err bsp_do_flight_plan(struct mp_params *mp_params) release_barrier(&rec->barrier); } - printk(BIOS_INFO, "%s done after %ld msecs.\n", __func__, + printk(BIOS_INFO, "%s done after %lld msecs.\n", __func__, stopwatch_duration_msecs(&sw)); return ret; } diff --git a/src/drivers/i2c/tpm/cr50.c b/src/drivers/i2c/tpm/cr50.c index 696533969c..b5cb32ce39 100644 --- a/src/drivers/i2c/tpm/cr50.c +++ b/src/drivers/i2c/tpm/cr50.c @@ -173,7 +173,7 @@ static int process_reset(void) continue; } - printk(BIOS_INFO, "TPM ready after %ld ms\n", + printk(BIOS_INFO, "TPM ready after %lld ms\n", stopwatch_duration_msecs(&sw)); return 0; @@ -183,7 +183,7 @@ static int process_reset(void) printk(BIOS_ERR, "Failed to read TPM\n"); else printk(BIOS_ERR, - "TPM failed to reset after %ld ms, status: %#x\n", + "TPM failed to reset after %lld ms, status: %#x\n", stopwatch_duration_msecs(&sw), access); return -1; diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c index 9934f55e49..5d78b6124b 100644 --- a/src/drivers/spi/spi_flash.c +++ b/src/drivers/spi/spi_flash.c @@ -212,7 +212,7 @@ int spi_flash_cmd_poll_bit(const struct spi_flash *flash, unsigned long timeout, return 0; } while (!stopwatch_expired(&sw)); - printk(BIOS_WARNING, "SF: timeout at %ld msec after %d attempts\n", + printk(BIOS_WARNING, "SF: timeout at %lld msec after %d attempts\n", stopwatch_duration_msecs(&sw), attempt); return -1; diff --git a/src/drivers/spi/tpm/tpm.c b/src/drivers/spi/tpm/tpm.c index 5645e57d82..68f9588d53 100644 --- a/src/drivers/spi/tpm/tpm.c +++ b/src/drivers/spi/tpm/tpm.c @@ -390,14 +390,14 @@ static enum cb_err tpm2_claim_locality(void) break; } - printk(BIOS_INFO, "TPM ready after %ld ms\n", + printk(BIOS_INFO, "TPM ready after %lld ms\n", stopwatch_duration_msecs(&sw)); return CB_SUCCESS; } while (!stopwatch_expired(&sw)); printk(BIOS_ERR, - "Failed to claim locality 0 after %ld ms, status: %#x\n", + "Failed to claim locality 0 after %lld ms, status: %#x\n", stopwatch_duration_msecs(&sw), access); return CB_ERR; diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c index 7ee2300f1e..1fa5906995 100644 --- a/src/ec/google/chromeec/ec.c +++ b/src/ec/google/chromeec/ec.c @@ -1651,7 +1651,7 @@ int google_chromeec_wait_for_displayport(long timeout_ms) } mdelay(200); } - printk(BIOS_INFO, "DisplayPort ready after %lu ms\n", + printk(BIOS_INFO, "DisplayPort ready after %lld ms\n", stopwatch_duration_msecs(&sw)); return ret; @@ -1671,7 +1671,7 @@ int google_chromeec_wait_for_dp_hpd(int port, long timeout_ms) } mdelay(100); } while (!(mux_flags & USB_PD_MUX_HPD_LVL) || !(mux_flags & USB_PD_MUX_DP_ENABLED)); - printk(BIOS_INFO, "HPD ready after %lu ms\n", stopwatch_duration_msecs(&sw)); + printk(BIOS_INFO, "HPD ready after %lld ms\n", stopwatch_duration_msecs(&sw)); return 0; } diff --git a/src/include/timer.h b/src/include/timer.h index 0e7104b70e..0f49ec67c9 100644 --- a/src/include/timer.h +++ b/src/include/timer.h @@ -47,28 +47,28 @@ int timers_run(void); /* Schedule a callback to be ran microseconds from time of invocation. * 0 returned on success, < 0 on error. */ -int timer_sched_callback(struct timeout_callback *tocb, unsigned long us); +int timer_sched_callback(struct timeout_callback *tocb, uint64_t us); /* Set an absolute time to a number of microseconds. */ -static inline void mono_time_set_usecs(struct mono_time *mt, long us) +static inline void mono_time_set_usecs(struct mono_time *mt, uint64_t us) { mt->microseconds = us; } /* Set an absolute time to a number of milliseconds. */ -static inline void mono_time_set_msecs(struct mono_time *mt, long ms) +static inline void mono_time_set_msecs(struct mono_time *mt, uint64_t ms) { mt->microseconds = ms * USECS_PER_MSEC; } /* Add microseconds to an absolute time. */ -static inline void mono_time_add_usecs(struct mono_time *mt, long us) +static inline void mono_time_add_usecs(struct mono_time *mt, int64_t us) { mt->microseconds += us; } /* Add milliseconds to an absolute time. */ -static inline void mono_time_add_msecs(struct mono_time *mt, long ms) +static inline void mono_time_add_msecs(struct mono_time *mt, int64_t ms) { mono_time_add_usecs(mt, ms * USECS_PER_MSEC); } @@ -102,8 +102,8 @@ static inline int mono_time_before(const struct mono_time *t1, } /* Return time difference between t1 and t2. i.e. t2 - t1. */ -static inline long mono_time_diff_microseconds(const struct mono_time *t1, - const struct mono_time *t2) +static inline int64_t mono_time_diff_microseconds(const struct mono_time *t1, + const struct mono_time *t2) { return t2->microseconds - t1->microseconds; } @@ -124,13 +124,13 @@ static inline void stopwatch_init(struct stopwatch *sw) sw->current = sw->expires = sw->start; } -static inline void stopwatch_init_usecs_expire(struct stopwatch *sw, long us) +static inline void stopwatch_init_usecs_expire(struct stopwatch *sw, uint64_t us) { stopwatch_init(sw); mono_time_add_usecs(&sw->expires, us); } -static inline void stopwatch_init_msecs_expire(struct stopwatch *sw, long ms) +static inline void stopwatch_init_msecs_expire(struct stopwatch *sw, uint64_t ms) { stopwatch_init_usecs_expire(sw, USECS_PER_MSEC * ms); } @@ -167,7 +167,7 @@ static inline void stopwatch_wait_until_expired(struct stopwatch *sw) /* * Return number of microseconds since starting the stopwatch. */ -static inline long stopwatch_duration_usecs(struct stopwatch *sw) +static inline int64_t stopwatch_duration_usecs(struct stopwatch *sw) { /* * If the stopwatch hasn't been ticked (current == start) tick @@ -179,7 +179,7 @@ static inline long stopwatch_duration_usecs(struct stopwatch *sw) return mono_time_diff_microseconds(&sw->start, &sw->current); } -static inline long stopwatch_duration_msecs(struct stopwatch *sw) +static inline int64_t stopwatch_duration_msecs(struct stopwatch *sw) { return stopwatch_duration_usecs(sw) / USECS_PER_MSEC; } @@ -197,7 +197,7 @@ static inline long stopwatch_duration_msecs(struct stopwatch *sw) */ #define wait_us(timeout_us, condition) \ ({ \ - long __ret = 0; \ + int64_t __ret = 0; \ struct stopwatch __sw; \ stopwatch_init_usecs_expire(&__sw, timeout_us); \ do { \ diff --git a/src/lib/hardwaremain.c b/src/lib/hardwaremain.c index e45ac9fe16..714452df20 100644 --- a/src/lib/hardwaremain.c +++ b/src/lib/hardwaremain.c @@ -283,7 +283,7 @@ static void bs_call_callbacks(struct boot_state *state, bscb->callback(bscb->arg); if (CONFIG(DEBUG_BOOT_STATE)) { timer_monotonic_get(&mt_stop); - printk(BIOS_DEBUG, "BS: callback (%p) @ %s (%ld ms).\n", bscb, + printk(BIOS_DEBUG, "BS: callback (%p) @ %s (%lld ms).\n", bscb, bscb_location(bscb), mono_time_diff_microseconds(&mt_start, &mt_stop) / USECS_PER_MSEC); diff --git a/src/lib/thread.c b/src/lib/thread.c index dc83df0668..a0d43118a8 100644 --- a/src/lib/thread.c +++ b/src/lib/thread.c @@ -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) diff --git a/src/mainboard/google/fizz/mainboard.c b/src/mainboard/google/fizz/mainboard.c index 13bc9b70ca..15be049496 100644 --- a/src/mainboard/google/fizz/mainboard.c +++ b/src/mainboard/google/fizz/mainboard.c @@ -245,7 +245,7 @@ static void wait_for_hpd(gpio_t gpio, long timeout) } mdelay(200); } - printk(BIOS_INFO, "HPD ready after %lu ms\n", + printk(BIOS_INFO, "HPD ready after %lld ms\n", stopwatch_duration_msecs(&sw)); } diff --git a/src/mainboard/google/hatch/variants/baseboard/mainboard.c b/src/mainboard/google/hatch/variants/baseboard/mainboard.c index c78ad5b154..e0c344064c 100644 --- a/src/mainboard/google/hatch/variants/baseboard/mainboard.c +++ b/src/mainboard/google/hatch/variants/baseboard/mainboard.c @@ -32,7 +32,7 @@ static void wait_for_hpd(gpio_t gpio, long timeout) } mdelay(200); } - printk(BIOS_INFO, "HPD ready after %lu ms\n", + printk(BIOS_INFO, "HPD ready after %lld ms\n", stopwatch_duration_msecs(&sw)); } diff --git a/src/security/vboot/ec_sync.c b/src/security/vboot/ec_sync.c index 56e6c44d60..5b3287ed13 100644 --- a/src/security/vboot/ec_sync.c +++ b/src/security/vboot/ec_sync.c @@ -174,7 +174,7 @@ static vb2_error_t ec_hash_image(enum vb2_firmware_selection select, return VB2_ERROR_UNKNOWN; } - printk(BIOS_INFO, "EC took %luus to calculate image hash\n", + printk(BIOS_INFO, "EC took %lldus to calculate image hash\n", stopwatch_duration_usecs(&sw)); *hash = resp.hash_digest; @@ -460,7 +460,7 @@ vb2_error_t vb2ex_ec_vboot_done(struct vb2_context *ctx) "EC requests limited power usage. Request shutdown.\n"); return VB2_REQUEST_SHUTDOWN; } else { - printk(BIOS_INFO, "Waited %luus to clear limit power flag.\n", + printk(BIOS_INFO, "Waited %lldus to clear limit power flag.\n", stopwatch_duration_usecs(&sw)); } @@ -541,7 +541,7 @@ vb2_error_t vb2ex_ec_jump_to_rw(void) mdelay(50); while (google_chromeec_hello()) { if (stopwatch_expired(&sw)) { - printk(BIOS_ERR, "EC did not return from reboot after %luus\n", + printk(BIOS_ERR, "EC did not return from reboot after %lldus\n", stopwatch_duration_usecs(&sw)); return VB2_ERROR_UNKNOWN; } @@ -549,7 +549,7 @@ vb2_error_t vb2ex_ec_jump_to_rw(void) mdelay(5); } - printk(BIOS_INFO, "\nEC returned from reboot after %luus\n", + printk(BIOS_INFO, "\nEC returned from reboot after %lldus\n", stopwatch_duration_usecs(&sw)); return VB2_SUCCESS; diff --git a/src/soc/amd/common/block/smu/smu.c b/src/soc/amd/common/block/smu/smu.c index d68867cae9..a44ff067c8 100644 --- a/src/soc/amd/common/block/smu/smu.c +++ b/src/soc/amd/common/block/smu/smu.c @@ -23,7 +23,7 @@ static int32_t smu_poll_response(bool print_command_duration) result = smn_read32(SMN_SMU_MESG_RESP); if (result) { if (print_command_duration) - printk(BIOS_SPEW, "SMU command consumed %ld usecs\n", + printk(BIOS_SPEW, "SMU command consumed %lld usecs\n", stopwatch_duration_usecs(&sw)); return result; } diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c index bbf0564906..da2d00adb7 100644 --- a/src/soc/intel/apollolake/chip.c +++ b/src/soc/intel/apollolake/chip.c @@ -800,7 +800,7 @@ static void configure_xhci_host_mode_port0(void) } } - printk(BIOS_INFO, "xHCI port 0 host switch over took %lu ms\n", + printk(BIOS_INFO, "xHCI port 0 host switch over took %lld ms\n", stopwatch_duration_msecs(&sw)); } diff --git a/src/soc/intel/apollolake/reset.c b/src/soc/intel/apollolake/reset.c index 186a546388..25b5bdef6c 100644 --- a/src/soc/intel/apollolake/reset.c +++ b/src/soc/intel/apollolake/reset.c @@ -44,5 +44,5 @@ void cf9_reset_prepare(void) } mdelay(1); } - printk(BIOS_SPEW, "CSE took %lu ms\n", stopwatch_duration_msecs(&sw)); + printk(BIOS_SPEW, "CSE took %lld ms\n", stopwatch_duration_msecs(&sw)); } diff --git a/src/soc/intel/apollolake/xdci.c b/src/soc/intel/apollolake/xdci.c index 5903e34bcc..086bbfd458 100644 --- a/src/soc/intel/apollolake/xdci.c +++ b/src/soc/intel/apollolake/xdci.c @@ -67,7 +67,7 @@ static void configure_host_mode_port0(struct device *dev) } } - printk(BIOS_INFO, "XDCI port 0 host switch over took %lu ms\n", + printk(BIOS_INFO, "XDCI port 0 host switch over took %lld ms\n", stopwatch_duration_msecs(&sw)); } diff --git a/src/soc/intel/common/block/cse/cse.c b/src/soc/intel/common/block/cse/cse.c index a68c98261f..1e223c72a2 100644 --- a/src/soc/intel/common/block/cse/cse.c +++ b/src/soc/intel/common/block/cse/cse.c @@ -315,7 +315,7 @@ uint8_t cse_wait_sec_override_mode(void) return 0; } } - printk(BIOS_DEBUG, "HECI: CSE took %lu ms to enter security override mode\n", + printk(BIOS_DEBUG, "HECI: CSE took %lld ms to enter security override mode\n", stopwatch_duration_msecs(&sw)); return 1; } @@ -335,7 +335,7 @@ uint8_t cse_wait_com_soft_temp_disable(void) return 0; } } - printk(BIOS_SPEW, "HECI: CSE took %lu ms to boot from RO\n", + printk(BIOS_SPEW, "HECI: CSE took %lld ms to boot from RO\n", stopwatch_duration_msecs(&sw)); return 1; } diff --git a/src/soc/intel/elkhartlake/tsn_gbe.c b/src/soc/intel/elkhartlake/tsn_gbe.c index 50e9e16999..ea2ef0e5c7 100644 --- a/src/soc/intel/elkhartlake/tsn_gbe.c +++ b/src/soc/intel/elkhartlake/tsn_gbe.c @@ -39,7 +39,7 @@ enum cb_err phy_gmii_ready(void *base) } while (!stopwatch_expired(&sw)); - printk(BIOS_ERR, "%s Timeout after %ld msec\n", __func__, + printk(BIOS_ERR, "%s Timeout after %lld msec\n", __func__, stopwatch_duration_msecs(&sw)); return CB_ERR; } diff --git a/src/soc/mediatek/common/mcu.c b/src/soc/mediatek/common/mcu.c index d0a1107548..42b312449f 100644 --- a/src/soc/mediatek/common/mcu.c +++ b/src/soc/mediatek/common/mcu.c @@ -31,7 +31,7 @@ int mtk_init_mcu(struct mtk_mcu *mcu) if (mcu->reset) mcu->reset(mcu); - printk(BIOS_DEBUG, "%s: Loaded (and reset) %s in %ld msecs (%zd bytes)\n", + printk(BIOS_DEBUG, "%s: Loaded (and reset) %s in %lld msecs (%zd bytes)\n", __func__, mcu->firmware_name, stopwatch_duration_msecs(&sw), mcu->run_size); return CB_SUCCESS; diff --git a/src/soc/mediatek/common/memory.c b/src/soc/mediatek/common/memory.c index f3f784e121..e4207222b0 100644 --- a/src/soc/mediatek/common/memory.c +++ b/src/soc/mediatek/common/memory.c @@ -265,7 +265,7 @@ static void mt_mem_init_run(struct dramc_param *dparam, ret = dram_run_fast_calibration(dparam); if (ret != 0) { printk(BIOS_ERR, "DRAM-K: Failed to run fast calibration " - "in %ld msecs, error: %d\n", + "in %lld msecs, error: %d\n", stopwatch_duration_msecs(&sw), ret); /* Erase flash data after fast calibration failed */ @@ -274,7 +274,7 @@ static void mt_mem_init_run(struct dramc_param *dparam, DRAMC_PARAM_HEADER_VERSION, dparam, mrc_cache_size); } else { - printk(BIOS_INFO, "DRAM-K: Fast calibration passed in %ld msecs\n", + printk(BIOS_INFO, "DRAM-K: Fast calibration passed in %lld msecs\n", stopwatch_duration_msecs(&sw)); return; } @@ -290,13 +290,13 @@ static void mt_mem_init_run(struct dramc_param *dparam, stopwatch_init(&sw); int err = dram_run_full_calibration(dparam); if (err == 0) { - printk(BIOS_INFO, "DRAM-K: Full calibration passed in %ld msecs\n", + printk(BIOS_INFO, "DRAM-K: Full calibration passed in %lld msecs\n", stopwatch_duration_msecs(&sw)); mrc_cache_stash_data(MRC_TRAINING_DATA, DRAMC_PARAM_HEADER_VERSION, dparam, mrc_cache_size); } else { - printk(BIOS_ERR, "DRAM-K: Full calibration failed in %ld msecs\n", + printk(BIOS_ERR, "DRAM-K: Full calibration failed in %lld msecs\n", stopwatch_duration_msecs(&sw)); } } diff --git a/src/soc/mediatek/common/mt6359p.c b/src/soc/mediatek/common/mt6359p.c index 580079ef47..de22b3e85d 100644 --- a/src/soc/mediatek/common/mt6359p.c +++ b/src/soc/mediatek/common/mt6359p.c @@ -141,7 +141,7 @@ static void pmic_efuse_setting(void) mt6359p_write(PMIC_BUCK_VPA_DLC_CON1, 0x800); } - printk(BIOS_DEBUG, "%s: Set efuses in %ld msecs\n", + printk(BIOS_DEBUG, "%s: Set efuses in %lld msecs\n", __func__, stopwatch_duration_msecs(&sw)); } diff --git a/src/soc/mediatek/common/spm.c b/src/soc/mediatek/common/spm.c index 71cad48d19..e39f3da56c 100644 --- a/src/soc/mediatek/common/spm.c +++ b/src/soc/mediatek/common/spm.c @@ -209,7 +209,7 @@ int spm_init(void) return -1; } - printk(BIOS_INFO, "SPM: %s done in %ld msecs, spm pc = %#x\n", + printk(BIOS_INFO, "SPM: %s done in %lld msecs, spm pc = %#x\n", __func__, stopwatch_duration_msecs(&sw), read32(&mtk_spm->md32pcm_pc)); diff --git a/src/soc/mediatek/mt8183/spm.c b/src/soc/mediatek/mt8183/spm.c index e35fc57e2f..5fba84de65 100644 --- a/src/soc/mediatek/mt8183/spm.c +++ b/src/soc/mediatek/mt8183/spm.c @@ -264,7 +264,7 @@ static int spm_load_firmware(enum dyna_load_pcm_index index, assert(offset < file_size); printk(BIOS_DEBUG, "SPM: version = %s\n", spm_bin + offset); - printk(BIOS_INFO, "SPM binary loaded in %ld msecs\n", + printk(BIOS_INFO, "SPM binary loaded in %lld msecs\n", stopwatch_duration_msecs(&sw)); return 0; @@ -330,7 +330,7 @@ int spm_init(void) spm_init_event_vector(pcmdesc); spm_kick_pcm_to_run(); - printk(BIOS_INFO, "SPM: %s done in %ld msecs\n", __func__, + printk(BIOS_INFO, "SPM: %s done in %lld msecs\n", __func__, stopwatch_duration_msecs(&sw)); return 0; diff --git a/src/soc/nvidia/tegra210/ccplex.c b/src/soc/nvidia/tegra210/ccplex.c index 0bc8fe99e3..b26eb8ea09 100644 --- a/src/soc/nvidia/tegra210/ccplex.c +++ b/src/soc/nvidia/tegra210/ccplex.c @@ -64,7 +64,7 @@ static void request_ram_repair(void) while ((read32(&flow->ram_repair) & sts) != sts) ; - printk(BIOS_DEBUG, "RAM repair complete in %ld usecs.\n", + printk(BIOS_DEBUG, "RAM repair complete in %lld usecs.\n", stopwatch_duration_usecs(&sw)); } diff --git a/src/soc/samsung/exynos5250/fb.c b/src/soc/samsung/exynos5250/fb.c index 9166b02cad..1fc926a7e1 100644 --- a/src/soc/samsung/exynos5250/fb.c +++ b/src/soc/samsung/exynos5250/fb.c @@ -174,7 +174,7 @@ static int s5p_dp_config_video(struct s5p_dp_device *dp, } while (!stopwatch_expired(&sw)); if (!timeout) { - printk(BIOS_ERR, "Video Clock Not ok after %ldus.\n", + printk(BIOS_ERR, "Video Clock Not ok after %lldus.\n", stopwatch_duration_usecs(&sw)); return -ERR_VIDEO_CLOCK_BAD; } diff --git a/src/southbridge/intel/bd82x6x/me_common.c b/src/southbridge/intel/bd82x6x/me_common.c index 96fc6c23d9..a48d412880 100644 --- a/src/southbridge/intel/bd82x6x/me_common.c +++ b/src/southbridge/intel/bd82x6x/me_common.c @@ -478,7 +478,7 @@ void exit_soft_temp_disable_wait(struct device *dev) if (!hfs.fw_init_complete) printk(BIOS_ERR, "ME: giving up on waiting for fw_init_complete\n"); else - printk(BIOS_NOTICE, "ME: took %lums to complete initialization\n", + printk(BIOS_NOTICE, "ME: took %lldms to complete initialization\n", stopwatch_duration_msecs(&sw)); }