Commit c94aff2e authored by Thomas Gleixner's avatar Thomas Gleixner

printk: Make console_sem a semaphore not a pseudo mutex

It needs to be investigated whether it can be replaced by a real
mutex, but that needs more thought and investigation.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 9c1e04c2
...@@ -73,7 +73,7 @@ EXPORT_SYMBOL(oops_in_progress); ...@@ -73,7 +73,7 @@ EXPORT_SYMBOL(oops_in_progress);
* provides serialisation for access to the entire console * provides serialisation for access to the entire console
* driver system. * driver system.
*/ */
static DECLARE_MUTEX(console_sem); static DEFINE_SEMAPHORE(console_sem);
struct console *console_drivers; struct console *console_drivers;
EXPORT_SYMBOL_GPL(console_drivers); EXPORT_SYMBOL_GPL(console_drivers);
...@@ -529,7 +529,7 @@ static void zap_locks(void) ...@@ -529,7 +529,7 @@ static void zap_locks(void)
/* If a crash is occurring, make sure we can't deadlock */ /* If a crash is occurring, make sure we can't deadlock */
spin_lock_init(&logbuf_lock); spin_lock_init(&logbuf_lock);
/* And make sure that we print immediately */ /* And make sure that we print immediately */
init_MUTEX(&console_sem); semaphore_init(&console_sem);
} }
#if defined(CONFIG_PRINTK_TIME) #if defined(CONFIG_PRINTK_TIME)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment