hugetlb: introduce generic version of prepare_hugepage_range
[muen/linux.git] / arch / sparc / include / asm / hugetlb.h
index f661362376e0c6a2bd84dfdea8e2f59d5fc1714d..2101ea217f33f1887cfd97268eca8f61a729eb00 100644 (file)
@@ -26,22 +26,6 @@ static inline int is_hugepage_only_range(struct mm_struct *mm,
        return 0;
 }
 
-/*
- * If the arch doesn't supply something else, assume that hugepage
- * size aligned regions are ok without further preparation.
- */
-static inline int prepare_hugepage_range(struct file *file,
-                       unsigned long addr, unsigned long len)
-{
-       struct hstate *h = hstate_file(file);
-
-       if (len & ~huge_page_mask(h))
-               return -EINVAL;
-       if (addr & ~huge_page_mask(h))
-               return -EINVAL;
-       return 0;
-}
-
 #define __HAVE_ARCH_HUGE_PTEP_CLEAR_FLUSH
 static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
                                         unsigned long addr, pte_t *ptep)