[lkml]   [2008]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch 29/29] initrd: Fix virtual/physical mix-up in overwrite test
On Thu, 24 Jul 2008 20:49:27 +0200 (CEST), Geert Uytterhoeven <> wrote:
> > Because an argument of mips virt_to_phys() is an pointer and
> > initrd_start is unsigned long. It seems most (all?) arch's
> > virt_to_phys() casts its argument to unsigned long internally. Should
> > mips follow?
> Alternatively, as initrd_start is really a virtual kernel address,
> perhaps it should be changed from unsigned long to void * instead?
> It's cast to `void *' in several place. arch/xtensa/kernel/setup.c even
> has `extern void *initrd_start' to fool around this?

I agree it would make code cleaner, but the conversion might be
somewhat hard.

If we converted initrd_start (and initrd_end) to void *, we should
also convert INITRD_START, free_initrd_mem(), some other arch specific
local/global variables and printk format strings. Also code like
"initrd_start & PAGE_MASK" should be changed too...

Is it worth to do?

Atsushi Nemoto

 \ /
  Last update: 2008-07-25 18:29    [W:0.069 / U:3.176 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site