[Top] [All Lists]

Re: Memory Management HAndling

Subject: Re: Memory Management HAndling
From: Ralf Baechle <>
Date: Fri, 11 Mar 2005 15:58:23 +0000
In-reply-to: <>
Original-recipient: rfc822;
References: <>
User-agent: Mutt/1.4.1i
On Fri, Mar 11, 2005 at 10:55:43AM +0530, wrote:

> I have been working on MMU of Linux Port of 2.4.20 kernel for MIPS Port.

You may want to change to a kernel that has less than 52 months worth of
bugs and security holes.

> I have found that MACROS like
> #define __pa(x)               ((unsigned long) (x) - PAGE_OFFSET)
> #define __va(x)               ((void *)((unsigned long) (x) + PAGE_OFFSET))
> #define virt_to_page(kaddr)   (mem_map + (__pa(kaddr) >> PAGE_SHIFT))
> These macros can handle memory pages in KSEG0. Any suggestions on how
> can they be changed for addressing memory present in HIGHMEM. Since VA
> will not be in linear relation with mem_map.

That's normal for highmem.  These macros will only work for lowmem.


<Prev in Thread] Current Thread [Next in Thread>