linux-mips
[Top] [All Lists]

Re: initrd_header for mips64 kernel

To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: initrd_header for mips64 kernel
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Fri, 2 May 2003 16:18:42 +0200 (MEST)
Cc: Linux/MIPS Development <linux-mips@linux-mips.org>, Ralf Baechle <ralf@linux-mips.org>
In-reply-to: <20030502.220517.74756988.anemo@mba.ocn.ne.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
On Fri, 2 May 2003, Atsushi Nemoto wrote:
> I found that initrd_header in mips64 cvs kernel is broken.  The
> initrd_header should be consist of two 32bit words while 32bit
> addinitrd is used for 64bit kernel too.
> 
> diff -ur linux-mips-cvs/arch/mips64/kernel/setup.c 
> linux.new/arch/mips64/kernel/setup.c
> --- linux-mips-cvs/arch/mips64/kernel/setup.c Wed Apr  9 22:06:57 2003
> +++ linux.new/arch/mips64/kernel/setup.c      Fri May  2 21:47:36 2003
> @@ -245,7 +245,7 @@
>  {
>  #ifdef CONFIG_BLK_DEV_INITRD
>       unsigned long tmp;
> -     unsigned long *initrd_header;
> +     unsigned int *initrd_header;

I think you better use u32 if it must be a 32-bit value.

>  #endif
>       unsigned long bootmap_size;
>       unsigned long start_pfn, max_pfn;
> @@ -255,7 +255,7 @@
>       tmp = (((unsigned long)&_end + PAGE_SIZE-1) & PAGE_MASK) - 8;
>       if (tmp < (unsigned long)&_end)
>               tmp += PAGE_SIZE;
> -     initrd_header = (unsigned long *)tmp;
> +     initrd_header = (unsigned int *)tmp;
>       if (initrd_header[0] == 0x494E5244) {
>               initrd_start = (unsigned long)&initrd_header[2];
>               initrd_end = initrd_start + initrd_header[1];

Gr{oetje,eeting}s,

                                                Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                                            -- Linus Torvalds


<Prev in Thread] Current Thread [Next in Thread>