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 10:39:14 +0200, Franck Bui-Huu <vagabon.xyz@xxxxxxxxx> wrote:
> > +#ifdef CONFIG_64BIT
> > +		/* HACK: Guess if the sign extension was forgotten */
> > +		if (initrd_start < XKPHYS) {
> > +			initrd_end -= initrd_start;
> > +			initrd_start = (int)initrd_start;
> > +			initrd_end += initrd_start;
> > +		}
> > +#endif
>  
> BTW, what about this condition:
> 
> 		if (initrd_start < PAGE_OFFSET) {
> 			...;
> 		}
> 
> that would work even on 32 bits kernel.

This does not work if PAGE_OFFSET was 0xffffffff80000000 and
initrd_start was 0x980000000XXXXXXX :-)

if ((long)initrd_start >= 0) {

would work.

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