From 96bc9e68d7c5a767e8867bbca690e3ef5b0ad69f Mon Sep 17 00:00:00 2001 From: Evan Wilson Date: Wed, 20 Apr 2016 11:54:30 -0700 Subject: Changes to debug suspend_again crashes Change-Id: I2df8d17791bba5205ca1e50d37dd44a8a3b92bd9 --- kernel/printk.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'kernel/printk.c') diff --git a/kernel/printk.c b/kernel/printk.c index 1b76b38986b..e97b94be00d 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -259,6 +259,11 @@ static char __log_buf[__LOG_BUF_LEN] __aligned(LOG_ALIGN); static char *log_buf = __log_buf; static u32 log_buf_len = __LOG_BUF_LEN; + +static char __olio_log_buf[__LOG_BUF_LEN*4] __aligned(LOG_ALIGN); +static char *olio_log_buf = __olio_log_buf; +static u32 olio_log_buf_len = __LOG_BUF_LEN*4; + /* cpu currently holding logbuf_lock */ static volatile unsigned int logbuf_cpu = UINT_MAX; @@ -1585,6 +1590,10 @@ asmlinkage int vprintk_emit(int facility, int level, #ifdef CONFIG_EARLY_PRINTK_DIRECT printascii(text); #endif + if(olio_log_buf + text_len - __olio_log_buf < __LOG_BUF_LEN){ + memcpy(olio_log_buf, text, text_len); + olio_log_buf += text_len; + } if (level == -1) level = default_message_loglevel; -- cgit v1.2.3-70-g09d2