Re: Bug: Discontigmem virt_to_page() [Alpha,ARM,Mips64?]

Daniel Phillips
2002-05-06T02:03:49Z

On Monday 06 May 2002 02:55, Russell King wrote:
> On Mon, May 06, 2002 at 01:54:52AM +0200, Daniel Phillips wrote:
> > I must be guilty of not explaining clearly. Suppose you have the following
> > physical memory map:
> >
> > 0: 128 MB
> > 8000,0000: 128 MB
> > 1,0000,0000: 128 MB
> > 1,8000,0000: 128 MB
> > 2,0000,0000: 128 MB
> > 2,8000,0000: 128 MB
> > 3,0000,0000: 128 MB
> > 3,8000,0000: 128 MB
> >
> > The total is 1 GB of installed ram. Yet the kernel's 1G virtual space,
> > can only handle 128 MB of it.
>
> I see no problem with the above with the existing discontigmem stuff.
> discontigmem does *not* require a linear relationship between kernel
> virtual and physical memory. I've been running kernels for a while
> on such systems.

I just went through every variant of arm in the kernel tree, and I found that
*all* of them implement a simple linear relationship between kernel virtual and
physical memory, of the form:

#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)

With such a linear mapping you *cannot* map physical memory distributed across
more than one gig into one gig of kernel virtual memory.

Are you talking about code that isn't in the tree?

--
Daniel