--- linux-2.6/include/video/impact.h	2011-07-25 00:06:58 +0200
+++ linux-2.6/include/video/impact.h	2018-08-21 00:01:31 +0200
@@ -194,10 +194,12 @@ unsigned long long ImpactCmdExecRSS( uns
 #define IMPACT_BLEND_ALPHA	0x0704c900
 
 #ifdef  __KERNEL__
-extern void impact_earlychar(unsigned char c);
-extern void impact_earlystring(char *s);
-extern void impact_earlyinit(void);
-extern void setup_impact_earlycons(void);
+extern void __init impact_earlychar(unsigned char c);
+extern void __init impact_earlystring(char *s);
+extern void __init impact_earlyinit(void);
+extern void __init setup_impact_earlycons(void);
+extern int  __init impact_earlyprintf(const char*, ...);
+extern int impact_earlyvprintf(const char*, va_list);
 #endif
 
 struct impact_cf_args


--- linux-2.6/drivers/video/impact.c	2011-11-01 20:16:43 +0100
+++ linux-2.6/drivers/video/impact.c	2018-09-20 22:02:20 +0200
@@ -102,11 +102,10 @@ struct impact_par {
 	struct {
 		/* DMA pool management, txtbl[0..num-1] passed to card */
-		unsigned int *txtbl;  /* txtbl[i] = pgidx(phys[i]) */
-		unsigned int txnum;   /* valid: txtbl[0..txnum-1] */
+		unsigned int *txtbl;  /* txtbl[i] = pgidx(dma_addr(virt[i])) */
+		unsigned int txnum;   /* valid: txtbl[0..txnum-1] --> card */
 		unsigned int txmax;   /* alloc: txtbl[0..txmax-1] */
-		unsigned long txphys; /* txphys = dma_addr(txtbl) */
+		unsigned long txphys; /* txphys = dma_addr(txtbl) --> card */
 		/* kernel DMA pools, the actual DMA-buffers */
 		void*         *virt;  /* virt[0..txnum-1]: dma-page-addresses */
-		unsigned long *phys;  /* phys[i] = dma_addr(virt[i]) */
 		unsigned int size;
 		unsigned long uaddr;  /* DMA-buffer's userland-address */
@@ -358,17 +357,14 @@ impact_resizekpool(struct fb_info *p, in
 			ClearPageReserved(dma_virt_to_page(PAR(p).pools[pool].virt[i]));
 			dma_free_coherent(NULL, PAGE_SIZE, PAR(p).pools[pool].virt[i],
-					PAR(p).pools[pool].phys[i]);
+					PAR(p).pools[pool].txtbl[i] << PAGE_SHIFT);
 		}
-		vfree(PAR(p).pools[pool].phys);
 		vfree(PAR(p).pools[pool].virt);
 	}
 	impact_alloctxtbl(p, pool, pages);
 	PAR(p).pools[pool].virt = vmalloc(pages*sizeof(unsigned long));
-	PAR(p).pools[pool].phys = vmalloc(pages*sizeof(unsigned long));
 	for (i = 0; i < PAR(p).pools[pool].txnum; i++) {
 		PAR(p).pools[pool].virt[i] =
 			dma_alloc_coherent(NULL, PAGE_SIZE, &dma_handle, GFP_KERNEL);
 		SetPageReserved(dma_virt_to_page(PAR(p).pools[pool].virt[i]));
-		PAR(p).pools[pool].phys[i] = dma_handle;
 		PAR(p).pools[pool].txtbl[i] = dma_handle >> PAGE_SHIFT;
 	}
@@ -814,6 +810,5 @@ static int impact_mmap(struct fb_info *p
 			vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
 		for (start = vma->vm_start, i = 0; i < n; i++) {
-			if (remap_pfn_range(vma, start,
-					PAR(p).pools[pool].phys[i] >> PAGE_SHIFT,
+			if (remap_pfn_range(vma, start, PAR(p).pools[pool].txtbl[i],
 					PAGE_SIZE, vma->vm_page_prot)) {
 				PAR(p).pools[pool].uaddr = 0;
@@ -890,5 +885,5 @@ static inline void impact_earlyrect(int
 }
 
-static void
+static void __init
 impact_paintchar(int x, int y, unsigned char *b, unsigned c, unsigned a)
 {
@@ -909,5 +904,5 @@ impact_paintchar(int x, int y, unsigned
 		*cfifo = IMPACT_CMD_CHAR(*b++ << 24);
 }
-static void impact_earlyhwinit(void)
+static void __init impact_earlyhwinit(void)
 {
 	impact_inithq(MMIO_FIXED);
@@ -952,5 +947,5 @@ early = {
 };
 
-void impact_earlychar(unsigned char c)
+void __init impact_earlychar(unsigned char c)
 {
 	if (early.posx != -1) {
@@ -981,5 +976,5 @@ out:
 	}
 }
-void impact_earlystring(char *s)
+void __init impact_earlystring(char *s)
 {
 	while (*s)
@@ -988,6 +983,7 @@ void impact_earlystring(char *s)
 static void impact_earlywrite(struct console *con, const char *s, unsigned n)
 {
-	while (n-- && *s)
-		impact_earlychar(*s++);
+	if (early.posx > -1) /* called after .init* sections are disbanded ? */
+		while (n-- && *s)
+			impact_earlychar(*s++);
 }
 void __init impact_earlyinit(void)
@@ -1013,4 +1009,30 @@ void __init setup_impact_earlycons(void)
 }
 
+static int __init early_vprintf(const char *fmt, va_list args)
+{                                                    
+	static char buf[256];
+	int n;
+	if (KERN_SOH_ASCII == *fmt) fmt++;
+	n = vsnprintf(buf, sizeof(buf), fmt, args);
+	impact_earlystring(buf);
+	return n;
+}
+
+int impact_earlyvprintf(const char *fmt, va_list args)
+{                                                    
+	/* called after .init* sections are disbanded ? */
+	return early.posx > -1 ? early_vprintf(fmt, args):-1;
+}
+
+int __init impact_earlyprintf(const char *fmt, ...)
+{                                                    
+	va_list args;
+	int n;
+	va_start(args, fmt);
+	n = early_vprintf(fmt, args);
+	va_end(args);
+	return n;
+}
+
 /* ------------------------------------------------------------------------- */
 

To be applied after welcomebg.diff

--- linux-2.6/drivers/video/impact.c	2011-11-01 20:16:43 +0100
+++ linux-2.6/drivers/video/impact.c	2018-09-20 22:02:20 +0200
@@ -1394,5 +1416,5 @@ static void expand_pixline(struct impact
 
 	for (i = 0; i < sizeof(virt)/sizeof(*virt); i++)
-		virt[i] = phys_to_virt(p->pools[0].phys[i]);
+		virt[i] = phys_to_virt(p->pools[0].txtbl[i] << PAGE_SHIFT);
 
 	for (i = bgbackup.idx[line]; i < bgbackup.idx[line+1]; i++) {
@@ -1427,5 +1449,5 @@ static void flush_pixline(struct impact_
 	int i;
 	for (i = 0; i < PAGES(PITCH(1280)); i++) {
-		void *v = phys_to_virt(p->pools[0].phys[i]);
+		void *v = phys_to_virt(p->pools[0].txtbl[i] << PAGE_SHIFT);
 		int k = PITCH(1280) - i * PAGE_SIZE;
 		if (k > PAGE_SIZE) k = PAGE_SIZE;


  A possibly serious bug is lurking in c-r4k.c since long: When the memory-
  chunk's size is larger than the relevant cache-size, r4k_dma_cache_inv()
  will call r4k_blast_[sd]cache(), i.e. it will write back, while its
  purpose is to prevent just that...
  This patch doesn't yet fix this, it only tries to find out, whether it's
  worthwile to implement r4k_blast_inv_[sd]cache() or better to scrap the
  special case(s) alltogether and use blast_inv_[sd]cache_range() for all
  sizes ;-)

--- linux-2.6.36/arch/mips/mm/c-r4k.c	2010-10-20 23:23:01 +0200
+++ linux-2.6.36/arch/mips/mm/c-r4k.c	2018-08-30 22:02:21 +0200
@@ -629,9 +629,10 @@ static void r4k_dma_cache_inv(unsigned l
 	BUG_ON(size == 0);
 
 	if (cpu_has_inclusive_pcaches) {
-		if (size >= scache_size)
+		if (size >= scache_size) {
+			panic("r4k_dma_cache_inv: %lu >= %lu: blast_scache\n", size, scache_size);
 			r4k_blast_scache();
-		else {
+		} else {
 			unsigned long lsize = cpu_scache_line_size();
 			unsigned long almask = ~(lsize - 1);
 
@@ -652,6 +653,7 @@ static void r4k_dma_cache_inv(unsigned l
 	}
 
 	if (cpu_has_safe_index_cacheops && size >= dcache_size) {
+		panic("r4k_dma_cache_inv: %lu >= %lu: blast_dcache\n", size, dcache_size);
 		r4k_blast_dcache();
 	} else {
 		unsigned long lsize = cpu_dcache_line_size();


