diff options
| author | Takashi Iwai <tiwai@suse.de> | 2012-01-31 15:13:14 +0100 | 
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2012-01-31 15:13:14 +0100 | 
| commit | ea51e5040e24eefe44d70bc654a237ca1f0225b0 (patch) | |
| tree | df2e5922dcdfafae62a10d8cd97f98121064fc23 /kernel/printk.c | |
| parent | 3422a47041b8cb8f14ac1e3926bcf711121df6dc (diff) | |
| parent | 8dbd52daee38adaae4d5a674bcca837e694a4f4c (diff) | |
Merge branch 'fix/asoc' into for-linus
Diffstat (limited to 'kernel/printk.c')
| -rw-r--r-- | kernel/printk.c | 24 | 
1 files changed, 12 insertions, 12 deletions
| diff --git a/kernel/printk.c b/kernel/printk.c index 1455a0d4eedd..13c0a1143f49 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -199,7 +199,7 @@ void __init setup_log_buf(int early)  		unsigned long mem;  		mem = memblock_alloc(new_log_buf_len, PAGE_SIZE); -		if (mem == MEMBLOCK_ERROR) +		if (!mem)  			return;  		new_log_buf = __va(mem);  	} else { @@ -521,7 +521,7 @@ static void __call_console_drivers(unsigned start, unsigned end)  	}  } -static int __read_mostly ignore_loglevel; +static bool __read_mostly ignore_loglevel;  static int __init ignore_loglevel_setup(char *str)  { @@ -532,7 +532,7 @@ static int __init ignore_loglevel_setup(char *str)  }  early_param("ignore_loglevel", ignore_loglevel_setup); -module_param_named(ignore_loglevel, ignore_loglevel, bool, S_IRUGO | S_IWUSR); +module_param(ignore_loglevel, bool, S_IRUGO | S_IWUSR);  MODULE_PARM_DESC(ignore_loglevel, "ignore loglevel setting, to"  	"print all kernel messages to the console."); @@ -688,6 +688,7 @@ static void zap_locks(void)  	oops_timestamp = jiffies; +	debug_locks_off();  	/* If a crash is occurring, make sure we can't deadlock */  	raw_spin_lock_init(&logbuf_lock);  	/* And make sure that we print immediately */ @@ -695,9 +696,9 @@ static void zap_locks(void)  }  #if defined(CONFIG_PRINTK_TIME) -static int printk_time = 1; +static bool printk_time = 1;  #else -static int printk_time = 0; +static bool printk_time = 0;  #endif  module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR); @@ -840,9 +841,8 @@ asmlinkage int vprintk(const char *fmt, va_list args)  	boot_delay_msec();  	printk_delay(); -	preempt_disable();  	/* This stops the holder of console_sem just where we want him */ -	raw_local_irq_save(flags); +	local_irq_save(flags);  	this_cpu = smp_processor_id();  	/* @@ -856,7 +856,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)  		 * recursion and return - but flag the recursion so that  		 * it can be printed at the next appropriate moment:  		 */ -		if (!oops_in_progress) { +		if (!oops_in_progress && !lockdep_recursing(current)) {  			recursion_bug = 1;  			goto out_restore_irqs;  		} @@ -962,9 +962,8 @@ asmlinkage int vprintk(const char *fmt, va_list args)  	lockdep_on();  out_restore_irqs: -	raw_local_irq_restore(flags); +	local_irq_restore(flags); -	preempt_enable();  	return printed_len;  }  EXPORT_SYMBOL(printk); @@ -1099,7 +1098,7 @@ int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, cha  	return -1;  } -int console_suspend_enabled = 1; +bool console_suspend_enabled = 1;  EXPORT_SYMBOL(console_suspend_enabled);  static int __init console_suspend_disable(char *str) @@ -1293,10 +1292,11 @@ again:  	raw_spin_lock(&logbuf_lock);  	if (con_start != log_end)  		retry = 1; +	raw_spin_unlock_irqrestore(&logbuf_lock, flags); +  	if (retry && console_trylock())  		goto again; -	raw_spin_unlock_irqrestore(&logbuf_lock, flags);  	if (wake_klogd)  		wake_up_klogd();  } | 
