aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBecky Bruce <beckyb@kernel.crashing.org>2011-10-10 06:50:36 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-12-07 00:26:21 -0500
commit765129594494994e3de91182857bc2586dbe21c9 (patch)
treef4df3296393f59773f2bf26e354fff4fe3b6b1a4
parentfa8cbaaf5a68f62db3f9a8444ecbb940b47984cb (diff)
powerpc: Only define HAVE_ARCH_HUGETLB_UNMAPPED_AREA if PPC_MM_SLICES
If we don't have slices, we should be able to use the generic hugetlb_get_unmapped_area() code Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--arch/powerpc/include/asm/page_64.h2
-rw-r--r--arch/powerpc/mm/hugetlbpage.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/include/asm/page_64.h b/arch/powerpc/include/asm/page_64.h
index fb40ede6bc0d..fed85e6290e1 100644
--- a/arch/powerpc/include/asm/page_64.h
+++ b/arch/powerpc/include/asm/page_64.h
@@ -130,7 +130,9 @@ do { \
130 130
131#ifdef CONFIG_HUGETLB_PAGE 131#ifdef CONFIG_HUGETLB_PAGE
132 132
133#ifdef CONFIG_PPC_MM_SLICES
133#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA 134#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
135#endif
134 136
135#endif /* !CONFIG_HUGETLB_PAGE */ 137#endif /* !CONFIG_HUGETLB_PAGE */
136 138
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 5964371303ac..6b1cf6478851 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -697,19 +697,17 @@ int gup_hugepd(hugepd_t *hugepd, unsigned pdshift,
697 return 1; 697 return 1;
698} 698}
699 699
700#ifdef CONFIG_PPC_MM_SLICES
700unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, 701unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
701 unsigned long len, unsigned long pgoff, 702 unsigned long len, unsigned long pgoff,
702 unsigned long flags) 703 unsigned long flags)
703{ 704{
704#ifdef CONFIG_PPC_MM_SLICES
705 struct hstate *hstate = hstate_file(file); 705 struct hstate *hstate = hstate_file(file);
706 int mmu_psize = shift_to_mmu_psize(huge_page_shift(hstate)); 706 int mmu_psize = shift_to_mmu_psize(huge_page_shift(hstate));
707 707
708 return slice_get_unmapped_area(addr, len, flags, mmu_psize, 1, 0); 708 return slice_get_unmapped_area(addr, len, flags, mmu_psize, 1, 0);
709#else
710 return get_unmapped_area(file, addr, len, pgoff, flags);
711#endif
712} 709}
710#endif
713 711
714unsigned long vma_mmu_pagesize(struct vm_area_struct *vma) 712unsigned long vma_mmu_pagesize(struct vm_area_struct *vma)
715{ 713{