[PATCH] powerc: fix build failure when CONFIG_HUGETLB_PAGE is not set

Cédric Le Goater clg at fr.ibm.com
Tue Oct 28 01:30:06 AEDT 2014


  CC      arch/powerpc/mm/slice.o
In file included from ../arch/powerpc/mm/slice.c:33:0:
../include/linux/hugetlb.h:141:47: error: expected identifier or ‘(’ before numeric constant
 #define is_hugepage_only_range(mm, addr, len) 0
                                               ^
../arch/powerpc/mm/slice.c:704:5: note: in expansion of macro ‘is_hugepage_only_range’
 int is_hugepage_only_range(struct mm_struct *mm, unsigned long addr,
     ^

Signed-off-by: Cédric Le Goater <clg at fr.ibm.com>
---
 arch/powerpc/mm/slice.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c
index 8d7bda94d196..89bc01222649 100644
--- a/arch/powerpc/mm/slice.c
+++ b/arch/powerpc/mm/slice.c
@@ -682,6 +682,7 @@ void slice_set_range_psize(struct mm_struct *mm, unsigned long start,
 	slice_convert(mm, mask, psize);
 }
 
+#ifdef CONFIG_HUGETLB_PAGE
 /*
  * is_hugepage_only_range() is used by generic code to verify whether
  * a normal mmap mapping (non hugetlbfs) is valid on a given area.
@@ -727,3 +728,4 @@ int is_hugepage_only_range(struct mm_struct *mm, unsigned long addr,
 	return !slice_check_fit(mask, available);
 }
 
+#endif
-- 
1.7.10.4



More information about the Linuxppc-dev mailing list