summaryrefslogtreecommitdiff
path: root/kernel/printk
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-09-08 11:24:16 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-09-08 11:24:16 -0300
commit376027f2a3888ef3dec73ee41f85d90e51162d78 (patch)
treeac9a9030d31cadc92fdc4145a3d9bf379064721f /kernel/printk
parente5fd91f1ef340da553f7a79da9540c3db711c937 (diff)
Add TuxOnIce support
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)
{