aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/hugetlb.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index be0e5d0db5ec..f533d336e569 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3660,7 +3660,20 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
3660 return (pte_t *) pmd; 3660 return (pte_t *) pmd;
3661} 3661}
3662 3662
3663struct page * 3663#endif /* CONFIG_ARCH_WANT_GENERAL_HUGETLB */
3664
3665/*
3666 * These functions are overwritable if your architecture needs its own
3667 * behavior.
3668 */
3669struct page * __weak
3670follow_huge_addr(struct mm_struct *mm, unsigned long address,
3671 int write)
3672{
3673 return ERR_PTR(-EINVAL);
3674}
3675
3676struct page * __weak
3664follow_huge_pmd(struct mm_struct *mm, unsigned long address, 3677follow_huge_pmd(struct mm_struct *mm, unsigned long address,
3665 pmd_t *pmd, int write) 3678 pmd_t *pmd, int write)
3666{ 3679{
@@ -3672,7 +3685,7 @@ follow_huge_pmd(struct mm_struct *mm, unsigned long address,
3672 return page; 3685 return page;
3673} 3686}
3674 3687
3675struct page * 3688struct page * __weak
3676follow_huge_pud(struct mm_struct *mm, unsigned long address, 3689follow_huge_pud(struct mm_struct *mm, unsigned long address,
3677 pud_t *pud, int write) 3690 pud_t *pud, int write)
3678{ 3691{
@@ -3684,19 +3697,6 @@ follow_huge_pud(struct mm_struct *mm, unsigned long address,
3684 return page; 3697 return page;
3685} 3698}
3686 3699
3687#else /* !CONFIG_ARCH_WANT_GENERAL_HUGETLB */
3688
3689/* Can be overriden by architectures */
3690struct page * __weak
3691follow_huge_pud(struct mm_struct *mm, unsigned long address,
3692 pud_t *pud, int write)
3693{
3694 BUG();
3695 return NULL;
3696}
3697
3698#endif /* CONFIG_ARCH_WANT_GENERAL_HUGETLB */
3699
3700#ifdef CONFIG_MEMORY_FAILURE 3700#ifdef CONFIG_MEMORY_FAILURE
3701 3701
3702/* Should be called in hugetlb_lock */ 3702/* Should be called in hugetlb_lock */