Hi,
I'm porting linux on an embedded system based on MIPS proc. I've
encountered several
problems and one of these is related to the physical memory which
doesn't start to 0.
This is actually not a big issue if code that makes physical address
convertions uses the
appropriate macros that do the job.
Unfortunately there are some places in linux where this is not the case.
"bootmem.c" is one of these places. For instance, it does "addr >>
PAGE_SHIFT"
instead of using "phys_to_pfn" macro in order to convert a physical
address into a page
frame number.
Are there any interests for a patch which will fix that ?
Regards,
Franck.
On Tue, 2005-04-05 at 09:39 +0200, Franck Bui-Huu wrote:
> Unfortunately there are some places in linux where this is not the case.
> "bootmem.c" is one of these places. For instance, it does "addr >>
> PAGE_SHIFT"
> instead of using "phys_to_pfn" macro in order to convert a physical
> address into a page
> frame number.
>
> Are there any interests for a patch which will fix that ?
Probably not.
I suggest using something like discontigmem (or even sparsemem for that
matter) to properly handles holes in your address space.
-- Dave
Dave Hansen wrote:
>I suggest using something like discontigmem (or even sparsemem for that
>matter) to properly handles holes in your address space.
>
>
>
I don't agree with you. First I don't see any advantages to use
"discontigmem" just
because physical ram address doesn't start to 0. I would embed and run
extra code
that is not needed for my case.
Secondly, even if you're right, code that uses "addr >> PAGE_SHIFT" are
by-passing
mm api, that is somehow a hack....
Cheers.
Franck