summaryrefslogtreecommitdiff
path: root/kernel/printk
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/printk')
-rw-r--r--kernel/printk/printk.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index f62f2d3f9..471938cd6 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -33,6 +33,7 @@
#include <linux/bootmem.h>
#include <linux/memblock.h>
#include <linux/syscalls.h>
+#include <linux/suspend.h>
#include <linux/kexec.h>
#include <linux/kdb.h>
#include <linux/ratelimit.h>
@@ -280,6 +281,20 @@ static char __log_buf[__LOG_BUF_LEN] __aligned(LOG_ALIGN);
static char *log_buf = __log_buf;
static u32 log_buf_len = __LOG_BUF_LEN;
+#ifdef CONFIG_TOI_INCREMENTAL
+void toi_set_logbuf_untracked(void)
+{
+ int i;
+ struct page *log_buf_start_page = virt_to_page(__log_buf);
+
+ printk("Not protecting kernel printk log buffer (%p-%p).\n",
+ __log_buf, __log_buf + __LOG_BUF_LEN);
+
+ for (i = 0; i < (1 << (CONFIG_LOG_BUF_SHIFT - PAGE_SHIFT)); i++)
+ SetPageTOI_Untracked(log_buf_start_page + i);
+}
+#endif
+
/* Return log buffer address */
char *log_buf_addr_get(void)
{