[Top] [All Lists]

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

To: Atsushi Nemoto <>
Subject: Re: [PATCH] do not count pages in holes with sparsemem
From: Franck Bui-Huu <>
Date: Thu, 06 Jul 2006 15:12:11 +0200
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta;; h=received:message-id:date:reply-to:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:from; b=CLDP9vO0jhrpmySENUWO5UK5vUuT/MlvQRje0LeI5IgzYGvK5Qeiv8KuLyFhgfNe1S6CKYM95N/YqTeop2ww5V+Wr4+XKdjwDUJ+UcsN86SBtHAtYHaSPehBFr4Ng1C0EFYq4aRtuDWGkFaiyb7V2lkZlWSKyBRM8U2gAxTRz5c=
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <>
Reply-to: Franck <>
User-agent: Thunderbird (X11/20060501)
Atsushi Nemoto wrote:
> On Wed, 05 Jul 2006 15:58:52 +0200, Franck Bui-Huu <> 
> wrote:
>> BTW why using __pa(OFFSET) ? isn't it going to yield always into 0 ?
>> At least on MIPS, it's defined as
>> #define __pa(x)      ((unsigned long) (x) - PAGE_OFFSET)
>> why not using ARCH_PFN_OFFSET instead ?
> Indeed.  I copied the code from free_area_init().  I think 0 is enough
> for MIPS.  Patch revised.  Thank you for comments.

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 + 

and use in your patch:

        free_area_init_node(0, NODE_DATA(0), zones_size, ARCH_PFN_OFFSET, 

So I would recommend to use ARCH_PFN_OFFSET.


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