Subject: Re: initrd_header for mips64 kernel

From: Atsushi Nemoto <[email-masked]>
Date: Tue, 21 Dec 2004 23:07:40 +0900 (JST)

>>>>> On Fri, 02 May 2003 22:05:17 +0900 (JST), Atsushi Nemoto <[email-masked]> said:

anemo> I found that initrd_header in mips64 cvs kernel is broken.  The
anemo> initrd_header should be consist of two 32bit words while 32bit
anemo> addinitrd is used for 64bit kernel too.

This is not still fixed.  Here is a revised patch for 2.6 tree.
Could you apply?

diff -u linux-mips/arch/mips/kernel/setup.c linux/arch/mips/kernel/
--- linux-mips/arch/mips/kernel/setup.c	Sat Dec 18 22:11:28 2004
+++ linux/arch/mips/kernel/setup.c	Sat Dec 18 21:20:59 2004
@@ -281,12 +281,12 @@
 		initrd_reserve_bootmem = 1;
 	} else {
 		unsigned long tmp;
-		unsigned long *initrd_header;
+		u32 *initrd_header;
 
-		tmp = ((reserved_end + PAGE_SIZE-1) & PAGE_MASK) - 8;
+		tmp = ((reserved_end + PAGE_SIZE-1) & PAGE_MASK) - sizeof(u32) * 2;
 		if (tmp < reserved_end)
 			tmp += PAGE_SIZE;
-		initrd_header = (unsigned long *)tmp;
+		initrd_header = (u32 *)tmp;
 		if (initrd_header[0] == 0x494E5244) {
 			initrd_start = (unsigned long)&initrd_header[2];
 			initrd_end = initrd_start + initrd_header[1];

---
Atsushi Nemoto