From 4a327fcef90ba27150a3e8741441b68c605ae248 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Sat, 26 Mar 2016 05:33:09 -0300 Subject: Add TuxOnIce support adapted for the 4.5-gnu kernel version --- kernel/printk/printk.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'kernel/printk') diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index af4e6968c..464c10ac4 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -284,6 +285,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) { -- cgit v1.2.3-54-g00ecf