diff options
| author | Olof Johansson <olof@lixom.net> | 2012-12-12 16:09:22 -0800 | 
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2012-12-12 16:10:00 -0800 | 
| commit | 4a76411ea3f1da9032e031f8fff8894b97d141b2 (patch) | |
| tree | 59976175d70b6e08aacd4abf7090919d3b78fc29 /kernel/printk.c | |
| parent | 5c1af2a7011bf719807de360cb64c2f610269a38 (diff) | |
| parent | fb6842a7bc44bf719bfe85d5819a153d7c215510 (diff) | |
| download | olio-linux-3.10-4a76411ea3f1da9032e031f8fff8894b97d141b2.tar.xz olio-linux-3.10-4a76411ea3f1da9032e031f8fff8894b97d141b2.zip  | |
ARM: arm-soc: Merge branch 'next/clk' into next/pm
Merge together a couple of the smaller pm/clock branches into one.
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'kernel/printk.c')
| -rw-r--r-- | kernel/printk.c | 12 | 
1 files changed, 11 insertions, 1 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index 2d607f4d179..22e070f3470 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -87,6 +87,12 @@ static DEFINE_SEMAPHORE(console_sem);  struct console *console_drivers;  EXPORT_SYMBOL_GPL(console_drivers); +#ifdef CONFIG_LOCKDEP +static struct lockdep_map console_lock_dep_map = { +	.name = "console_lock" +}; +#endif +  /*   * This is used for debugging the mess that is the VT code by   * keeping track if we have the console semaphore held. It's @@ -1908,12 +1914,14 @@ static int __cpuinit console_cpu_notify(struct notifier_block *self,   */  void console_lock(void)  { -	BUG_ON(in_interrupt()); +	might_sleep(); +  	down(&console_sem);  	if (console_suspended)  		return;  	console_locked = 1;  	console_may_schedule = 1; +	mutex_acquire(&console_lock_dep_map, 0, 0, _RET_IP_);  }  EXPORT_SYMBOL(console_lock); @@ -1935,6 +1943,7 @@ int console_trylock(void)  	}  	console_locked = 1;  	console_may_schedule = 0; +	mutex_acquire(&console_lock_dep_map, 0, 1, _RET_IP_);  	return 1;  }  EXPORT_SYMBOL(console_trylock); @@ -2095,6 +2104,7 @@ skip:  		local_irq_restore(flags);  	}  	console_locked = 0; +	mutex_release(&console_lock_dep_map, 1, _RET_IP_);  	/* Release the exclusive_console once it is used */  	if (unlikely(exclusive_console))  |