* [BOOTMEM] bad physical address convertions.
@ 2005-04-05 7:39 Franck Bui-Huu
2005-04-05 20:00 ` Dave Hansen
0 siblings, 1 reply; 3+ messages in thread
From: Franck Bui-Huu @ 2005-04-05 7:39 UTC (permalink / raw)
To: linux-kernel
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [BOOTMEM] bad physical address convertions.
2005-04-05 7:39 [BOOTMEM] bad physical address convertions Franck Bui-Huu
@ 2005-04-05 20:00 ` Dave Hansen
2005-04-06 8:30 ` Franck Bui-Huu
0 siblings, 1 reply; 3+ messages in thread
From: Dave Hansen @ 2005-04-05 20:00 UTC (permalink / raw)
To: franck.bui-huu; +Cc: Linux Kernel Mailing List
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [BOOTMEM] bad physical address convertions.
2005-04-05 20:00 ` Dave Hansen
@ 2005-04-06 8:30 ` Franck Bui-Huu
0 siblings, 0 replies; 3+ messages in thread
From: Franck Bui-Huu @ 2005-04-06 8:30 UTC (permalink / raw)
To: Dave Hansen; +Cc: Linux Kernel Mailing List
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-04-06 8:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-05 7:39 [BOOTMEM] bad physical address convertions Franck Bui-Huu
2005-04-05 20:00 ` Dave Hansen
2005-04-06 8:30 ` Franck Bui-Huu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox