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

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

 



Atsushi Nemoto wrote:
> 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;
>> 		
>>
>> I don't think we need any sign extension here, do we ?
> 
> Oh I was confused.  You are right.

yeah I was confused at the first look too. I think rewriting it like
this:

	initrd_start = (unsigned long)(initrd_header + 2);

is less confusing...

> 
> 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.
> 

ok, I'm rebuilding a new patchset and sending it pretty soon,

		Franck


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

  Powered by Linux