Re: [PATCH 6/7] setup.c: clean up initrd related code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 19 Oct 2006 09:29:48 +0200, Franck Bui-Huu <vagabon.xyz@xxxxxxxxx> wrote:
> > But we need sign extension for values comes from the initrd_header
> > anyway.  The initrd_header is fixed-size and can not hold 64-bit
> > address.
> > 
> 
> initrd_header gives only 2 numbers: size of initrd, and a magic number,
> well it's what I understood when rewriting the code.
> 
> the start address of initrd is given by:
> 
> 	initrd_header = __va(PAGE_ALIGN(__pa_symbol(&_end) + 8)) - 8;
> 	initrd_start = (unsigned long)&initrd_header[2];
> 
> I don't think we need any sign extension here, do we ?

Oh I was confused.  You are right.

BTW, we can just ignore initrd instead of panic() if invalid values
given.  This place around is too early to print panic message.
Continuing with printk(KERN_ERR) will give us a chance to see what's
wrong.

---
Atsushi Nemoto


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux