WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH 2/3] mm: Add SECTION_ALIGN_UP() and SECTION_ALIGN

To: Daniel Kiper <dkiper@xxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 2/3] mm: Add SECTION_ALIGN_UP() and SECTION_ALIGN_DOWN() macro
From: David Rientjes <rientjes@xxxxxxxxxx>
Date: Mon, 28 Mar 2011 15:46:27 -0700 (PDT)
Cc: jeremy@xxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, ian.campbell@xxxxxxxxxx, haicheng.li@xxxxxxxxxxxxxxx, konrad.wilk@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, dan.magenheimer@xxxxxxxxxx, v.tolstov@xxxxxxxxx, dave@xxxxxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, andi.kleen@xxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx, fengguang.wu@xxxxxxxxx, wdauchy@xxxxxxxxx
Delivery-date: Wed, 06 Apr 2011 18:25:53 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1301352392; bh=jLykjpYZWnAc7O4z6zJ7DcQ+X5A=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=R8ytIbDS07oGK2aoS5K4xDhd5uj8CbQcVYmtmnjl7kY4w8tgj7fTEwtIXIE7Xv5IL JQZ9JVERKHTBhH7LmSBEQ==
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:date:from:x-x-sender:to:cc:subject:in-reply-to :message-id:references:user-agent:mime-version:content-type; bh=eWJTJHbg/dcY8bBY+mM8lBcByTMNxJMPwClssQhK0dM=; b=si0mCkXp9OHyf7gbC2xgR57p1nkllL0/F2/0g6xqT64zqyuOsuDds+8fTVy93DdAD1 ttmXU4/4WEx9pLJynuFw==
Domainkey-signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=date:from:x-x-sender:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type; b=WoVVsGigOyWxml9IWfCYoNtNo7VE5qWTOtdvIOr0Ee51SToYPTtFEyaWQyRMIl8Phr eKsQHjkeHiirr7OIGCJA==
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110328092412.GC13826@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20110328092412.GC13826@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Mon, 28 Mar 2011, Daniel Kiper wrote:

> diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
> index 02ecb01..d342820 100644
> --- a/include/linux/mmzone.h
> +++ b/include/linux/mmzone.h
> @@ -931,6 +931,9 @@ static inline unsigned long early_pfn_to_nid(unsigned 
> long pfn)
>  #define pfn_to_section_nr(pfn) ((pfn) >> PFN_SECTION_SHIFT)
>  #define section_nr_to_pfn(sec) ((sec) << PFN_SECTION_SHIFT)
>  
> +#define SECTION_ALIGN_UP(pfn)        (((pfn) + PAGES_PER_SECTION - 1) & 
> PAGE_SECTION_MASK)
> +#define SECTION_ALIGN_DOWN(pfn)      ((pfn) & PAGE_SECTION_MASK)
> +
>  #ifdef CONFIG_SPARSEMEM
>  
>  /*

These are only valid for CONFIG_SPARSEMEM, so they need to be defined 
conditionally.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

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