[coreboot-gerrit] New patch to review for coreboot: 12f68a1 x86: remove printk() from init_timer()

Aaron Durbin (adurbin@chromium.org) gerrit at coreboot.org
Tue Jun 9 22:10:11 CEST 2015


Aaron Durbin (adurbin at chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10483

-gerrit

commit 12f68a1fde0390456b7fd580152edc223588b448
Author: Aaron Durbin <adurbin at chromium.org>
Date:   Tue Jun 9 15:02:50 2015 -0500

    x86: remove printk() from init_timer()
    
    For console drivers which use udelay() we can deadlock
    in the printk path on the spinlock. The reason is that
    on the first call to udelay() from within a console driver
    it will go back down the printk() path deadlocking oneself.
    
    Just remove the printk() as it was asymmetric on romstage
    vs ramstage.
    
    Change-Id: I30fe7d6e5b4684f17d4f353c0816b64f9242de0a
    Signed-off-by: Aaron Durbin <adurbin at chromium.org>
---
 src/cpu/x86/tsc/delay_tsc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/cpu/x86/tsc/delay_tsc.c b/src/cpu/x86/tsc/delay_tsc.c
index 5aaba90..0ad5d3b 100644
--- a/src/cpu/x86/tsc/delay_tsc.c
+++ b/src/cpu/x86/tsc/delay_tsc.c
@@ -152,10 +152,8 @@ static unsigned long long calibrate_tsc(void)
 
 void init_timer(void)
 {
-	if (!clocks_per_usec) {
+	if (!clocks_per_usec)
 		clocks_per_usec = calibrate_tsc();
-		printk(BIOS_INFO, "clocks_per_usec: %lu\n", clocks_per_usec);
-	}
 }
 
 static inline unsigned long get_clocks_per_usec(void)



More information about the coreboot-gerrit mailing list