aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/printk.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/printk.c')
-rw-r--r--kernel/printk.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/kernel/printk.c b/kernel/printk.c
index 932ea21feb18..f38b07f78a4e 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -653,6 +653,20 @@ static int recursion_bug;
653static int new_text_line = 1; 653static int new_text_line = 1;
654static char printk_buf[1024]; 654static char printk_buf[1024];
655 655
656int printk_delay_msec __read_mostly;
657
658static inline void printk_delay(void)
659{
660 if (unlikely(printk_delay_msec)) {
661 int m = printk_delay_msec;
662
663 while (m--) {
664 mdelay(1);
665 touch_nmi_watchdog();
666 }
667 }
668}
669
656asmlinkage int vprintk(const char *fmt, va_list args) 670asmlinkage int vprintk(const char *fmt, va_list args)
657{ 671{
658 int printed_len = 0; 672 int printed_len = 0;
@@ -662,6 +676,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
662 char *p; 676 char *p;
663 677
664 boot_delay_msec(); 678 boot_delay_msec();
679 printk_delay();
665 680
666 preempt_disable(); 681 preempt_disable();
667 /* This stops the holder of console_sem just where we want him */ 682 /* This stops the holder of console_sem just where we want him */