diff options
Diffstat (limited to 'kernel/printk.c')
| -rw-r--r-- | kernel/printk.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index 8fe465ac008a..b2ebaee8c377 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
| @@ -85,7 +85,7 @@ EXPORT_SYMBOL(oops_in_progress); | |||
| 85 | * provides serialisation for access to the entire console | 85 | * provides serialisation for access to the entire console |
| 86 | * driver system. | 86 | * driver system. |
| 87 | */ | 87 | */ |
| 88 | static DECLARE_MUTEX(console_sem); | 88 | static DEFINE_SEMAPHORE(console_sem); |
| 89 | struct console *console_drivers; | 89 | struct console *console_drivers; |
| 90 | EXPORT_SYMBOL_GPL(console_drivers); | 90 | EXPORT_SYMBOL_GPL(console_drivers); |
| 91 | 91 | ||
| @@ -210,7 +210,7 @@ __setup("log_buf_len=", log_buf_len_setup); | |||
| 210 | 210 | ||
| 211 | #ifdef CONFIG_BOOT_PRINTK_DELAY | 211 | #ifdef CONFIG_BOOT_PRINTK_DELAY |
| 212 | 212 | ||
| 213 | static unsigned int boot_delay; /* msecs delay after each printk during bootup */ | 213 | static int boot_delay; /* msecs delay after each printk during bootup */ |
| 214 | static unsigned long long loops_per_msec; /* based on boot_delay */ | 214 | static unsigned long long loops_per_msec; /* based on boot_delay */ |
| 215 | 215 | ||
| 216 | static int __init boot_delay_setup(char *str) | 216 | static int __init boot_delay_setup(char *str) |
| @@ -556,7 +556,7 @@ static void zap_locks(void) | |||
| 556 | /* If a crash is occurring, make sure we can't deadlock */ | 556 | /* If a crash is occurring, make sure we can't deadlock */ |
| 557 | spin_lock_init(&logbuf_lock); | 557 | spin_lock_init(&logbuf_lock); |
| 558 | /* And make sure that we print immediately */ | 558 | /* And make sure that we print immediately */ |
| 559 | init_MUTEX(&console_sem); | 559 | sema_init(&console_sem, 1); |
| 560 | } | 560 | } |
| 561 | 561 | ||
| 562 | #if defined(CONFIG_PRINTK_TIME) | 562 | #if defined(CONFIG_PRINTK_TIME) |
| @@ -647,6 +647,7 @@ static inline int can_use_console(unsigned int cpu) | |||
| 647 | * released but interrupts still disabled. | 647 | * released but interrupts still disabled. |
| 648 | */ | 648 | */ |
| 649 | static int acquire_console_semaphore_for_printk(unsigned int cpu) | 649 | static int acquire_console_semaphore_for_printk(unsigned int cpu) |
| 650 | __releases(&logbuf_lock) | ||
| 650 | { | 651 | { |
| 651 | int retval = 0; | 652 | int retval = 0; |
| 652 | 653 | ||
| @@ -1511,7 +1512,7 @@ int kmsg_dump_unregister(struct kmsg_dumper *dumper) | |||
| 1511 | } | 1512 | } |
| 1512 | EXPORT_SYMBOL_GPL(kmsg_dump_unregister); | 1513 | EXPORT_SYMBOL_GPL(kmsg_dump_unregister); |
| 1513 | 1514 | ||
| 1514 | static const char const *kmsg_reasons[] = { | 1515 | static const char * const kmsg_reasons[] = { |
| 1515 | [KMSG_DUMP_OOPS] = "oops", | 1516 | [KMSG_DUMP_OOPS] = "oops", |
| 1516 | [KMSG_DUMP_PANIC] = "panic", | 1517 | [KMSG_DUMP_PANIC] = "panic", |
| 1517 | [KMSG_DUMP_KEXEC] = "kexec", | 1518 | [KMSG_DUMP_KEXEC] = "kexec", |
