aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm
diff options
context:
space:
mode:
authorWanpeng Li <liwanp@linux.vnet.ibm.com>2013-07-03 18:02:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 19:07:32 -0400
commit2415cf12e04d415b16d9c2f2a705bcd6cd9a0474 (patch)
treed533c49c5a011f3802a389e5bb55ede9d9b173bf /arch/powerpc/mm
parent5f1e31d2f5977d910d0b2f5018173e99241d1940 (diff)
mm/hugetlb: use already existing interface huge_page_shift
Use the already existing interface huge_page_shift instead of h->order + PAGE_SHIFT. Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: David Rientjes <rientjes@google.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Michal Hocko <mhocko@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r--arch/powerpc/mm/hugetlbpage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 77fdd2cef33b..4210549ac95e 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -357,7 +357,7 @@ void add_gpage(u64 addr, u64 page_size, unsigned long number_of_pages)
357int alloc_bootmem_huge_page(struct hstate *hstate) 357int alloc_bootmem_huge_page(struct hstate *hstate)
358{ 358{
359 struct huge_bootmem_page *m; 359 struct huge_bootmem_page *m;
360 int idx = shift_to_mmu_psize(hstate->order + PAGE_SHIFT); 360 int idx = shift_to_mmu_psize(huge_page_shift(hstate));
361 int nr_gpages = gpage_freearray[idx].nr_gpages; 361 int nr_gpages = gpage_freearray[idx].nr_gpages;
362 362
363 if (nr_gpages == 0) 363 if (nr_gpages == 0)