Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756063Ab3EVKwv (ORCPT ); Wed, 22 May 2013 06:52:51 -0400 Received: from cantor2.suse.de ([195.135.220.15]:38282 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755540Ab3EVKws (ORCPT ); Wed, 22 May 2013 06:52:48 -0400 Date: Wed, 22 May 2013 12:52:46 +0200 From: Michal Hocko To: Wanpeng Li Cc: Andrew Morton , KAMEZAWA Hiroyuki , David Rientjes , Jiang Liu , Tang Chen , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/4] mm/hugetlb: use already exist interface huge_page_shift Message-ID: <20130522105246.GF19989@dhcp22.suse.cz> References: <1369214970-1526-1-git-send-email-liwanp@linux.vnet.ibm.com> <1369214970-1526-4-git-send-email-liwanp@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1369214970-1526-4-git-send-email-liwanp@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1325 Lines: 45 On Wed 22-05-13 17:29:30, Wanpeng Li wrote: > Use already exist interface huge_page_shift instead of h->order + PAGE_SHIFT. alloc_bootmem_huge_page in powerpc uses the same construct so maybe you want to udpate that one as well. > > Signed-off-by: Wanpeng Li Reviewed-by: Michal Hocko > --- > mm/hugetlb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > index f8feeec..b6ff0ee 100644 > --- a/mm/hugetlb.c > +++ b/mm/hugetlb.c > @@ -319,7 +319,7 @@ unsigned long vma_kernel_pagesize(struct vm_area_struct *vma) > > hstate = hstate_vma(vma); > > - return 1UL << (hstate->order + PAGE_SHIFT); > + return 1UL << huge_page_shift(hstate); > } > EXPORT_SYMBOL_GPL(vma_kernel_pagesize); > > -- > 1.8.1.2 > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: email@kvack.org -- Michal Hocko SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/