mm/hugetlb: reduce arch dependent code about hugetlb_prefault_arch_hook
authorZhang Zhen <zhenzhang.zhang@huawei.com>
Wed, 24 Jun 2015 23:56:25 +0000 (16:56 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 25 Jun 2015 00:49:41 +0000 (17:49 -0700)
Currently we have many duplicates in definitions of
hugetlb_prefault_arch_hook.  In all architectures this function is empty.

Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 files changed:
arch/arm/include/asm/hugetlb.h
arch/arm64/include/asm/hugetlb.h
arch/ia64/include/asm/hugetlb.h
arch/metag/include/asm/hugetlb.h
arch/mips/include/asm/hugetlb.h
arch/powerpc/include/asm/hugetlb.h
arch/s390/include/asm/hugetlb.h
arch/sh/include/asm/hugetlb.h
arch/sparc/include/asm/hugetlb.h
arch/tile/include/asm/hugetlb.h
arch/x86/include/asm/hugetlb.h
fs/hugetlbfs/inode.c

index 1f1b1cd112f3adf08c4f65bec4e132b89433ce63..31bb7dccb971caa51e2b4f4dbc4676978c8e68e6 100644 (file)
@@ -53,10 +53,6 @@ static inline int prepare_hugepage_range(struct file *file,
        return 0;
 }
 
-static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm)
-{
-}
-
 static inline int huge_pte_none(pte_t pte)
 {
        return pte_none(pte);
index 5b7ca8ace95f466faebb8fbb58d13ac974c7cf33..734c17e89e94582539372ec1e4ea6ceab7fb7fb1 100644 (file)
@@ -86,10 +86,6 @@ static inline int prepare_hugepage_range(struct file *file,
        return 0;
 }
 
-static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm)
-{
-}
-
 static inline int huge_pte_none(pte_t pte)
 {
        return pte_none(pte);
index aa910054b8e7323995adfdadfe3f8eb51a896b61..ff1377bc02a657ed3870c54be7ecdc0b87ab042d 100644 (file)
@@ -20,10 +20,6 @@ static inline int is_hugepage_only_range(struct mm_struct *mm,
                REGION_NUMBER((addr)+(len)-1) == RGN_HPAGE);
 }
 
-static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm)
-{
-}
-
 static inline void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
                                   pte_t *ptep, pte_t pte)
 {
index 471f481e67f3ebb07b34364890dc9a3feb56b013..f730b396d79bdd1f08a269b45af0fa4b0880715e 100644 (file)
@@ -14,10 +14,6 @@ static inline int is_hugepage_only_range(struct mm_struct *mm,
 int prepare_hugepage_range(struct file *file, unsigned long addr,
                                                unsigned long len);
 
-static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm)
-{
-}
-
 static inline void hugetlb_free_pgd_range(struct mmu_gather *tlb,
                                          unsigned long addr, unsigned long end,
                                          unsigned long floor,
index fe0d15d3266015445555901c7e32b41312c37be7..4a5bb5453408edd2eb729794f967e4692673e91a 100644 (file)
@@ -38,10 +38,6 @@ static inline int prepare_hugepage_range(struct file *file,
        return 0;
 }
 
-static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm)
-{
-}
-
 static inline void hugetlb_free_pgd_range(struct mmu_gather *tlb,
                                          unsigned long addr,
                                          unsigned long end,
index 1d53a65b4ec17e08d08db4912ed3a079495db351..4bbd3c8c2888ecbb9d8e07c28bfd0c32a0c235ca 100644 (file)
@@ -112,11 +112,6 @@ static inline int prepare_hugepage_range(struct file *file,
        return 0;
 }
 
-static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm)
-{
-}
-
-
 static inline void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
                                   pte_t *ptep, pte_t pte)
 {
index 11eae5f55b709d1e37e69f2b44eb762d48475e6e..dfb542ade6b16653cb320cc84c472b62568bf9cc 100644 (file)
@@ -35,7 +35,6 @@ static inline int prepare_hugepage_range(struct file *file,
        return 0;
 }
 
-#define hugetlb_prefault_arch_hook(mm)         do { } while (0)
 #define arch_clear_hugepage_flags(page)                do { } while (0)
 
 int arch_prepare_hugepage(struct page *page);
index 699255d6d1c634bc9b3fe53d1c2abb5778a6a7dd..b788a9bc89185bc7f7af515f7d6b065d175967da 100644 (file)
@@ -26,9 +26,6 @@ static inline int prepare_hugepage_range(struct file *file,
        return 0;
 }
 
-static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm) {
-}
-
 static inline void hugetlb_free_pgd_range(struct mmu_gather *tlb,
                                          unsigned long addr, unsigned long end,
                                          unsigned long floor,
index e4cab465b81f86eb4d7f2a3b03c5a62b67d28a8d..3130d763631287cb4315316b1ed380e0ccb9d2fb 100644 (file)
@@ -11,10 +11,6 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
 pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
                              pte_t *ptep);
 
-static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm)
-{
-}
-
 static inline int is_hugepage_only_range(struct mm_struct *mm,
                                         unsigned long addr,
                                         unsigned long len) {
index 3257733003f8dcd550376b02bbaa3acb7a79895b..1abd00c5523695ccc8d1556f69f7e97e1e6929ae 100644 (file)
@@ -40,10 +40,6 @@ static inline int prepare_hugepage_range(struct file *file,
        return 0;
 }
 
-static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm)
-{
-}
-
 static inline void hugetlb_free_pgd_range(struct mmu_gather *tlb,
                                          unsigned long addr, unsigned long end,
                                          unsigned long floor,
index 68c05398bba9b449a1324d54b584ce52d52aa8d1..dab7a3a750bfe521b9e23f80484caf139ed34f29 100644 (file)
@@ -26,9 +26,6 @@ static inline int prepare_hugepage_range(struct file *file,
        return 0;
 }
 
-static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm) {
-}
-
 static inline void hugetlb_free_pgd_range(struct mmu_gather *tlb,
                                          unsigned long addr, unsigned long end,
                                          unsigned long floor,
index 87724c1d7be66361a4b36fc5365818f02bd6b60b..0cf74df68617b8738342a5f7be7992ccc596bf0a 100644 (file)
@@ -130,7 +130,6 @@ static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma)
                goto out;
 
        ret = 0;
-       hugetlb_prefault_arch_hook(vma->vm_mm);
        if (vma->vm_flags & VM_WRITE && inode->i_size < len)
                inode->i_size = len;
 out: