linux-mips
[Top] [All Lists]

Re: [PATCH] do not count pages in holes with sparsemem

To: vagabon.xyz@gmail.com
Subject: Re: [PATCH] do not count pages in holes with sparsemem
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Thu, 06 Jul 2006 23:36:34 +0900 (JST)
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
In-reply-to: <44AD0C2B.7060204@innova-card.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <44ABC59C.6070607@innova-card.com> <20060705.231737.59032119.anemo@mba.ocn.ne.jp> <44AD0C2B.7060204@innova-card.com>
Sender: linux-mips-bounce@linux-mips.org
On Thu, 06 Jul 2006 15:12:11 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> 
wrote:
> Ok thinking more about it, some platforms may have physical memory
> that doesn't start at 0. MIPS doesn't support such platform though it
> should be fairly easy. In that case __pa should be defined as:
> 
>       #define __pa(x) ((unsigned long) (x) - PAGE_OFFSET + 
> PFN_PHYS(ARCH_PFN_OFFSET))
> 
> and use in your patch:
> 
>       free_area_init_node(0, NODE_DATA(0), zones_size, ARCH_PFN_OFFSET, 
> zholes_size);
> 
> So I would recommend to use ARCH_PFN_OFFSET.

Well, currently ARCH_PFN_OFFSET is defined in
asm-generic/memory_model.h only for FLATMEM case.  I think other
memory models do not need it because it is just a case that a first
hole begins at pfn 0.

---
Atsushi Nemoto

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