diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 000837e126e6..d5d6bbe2259e 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -284,6 +284,14 @@ static inline unsigned int blocks_per_huge_page(struct hstate *h) #include +#ifndef arch_make_huge_pte +static inline pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct *vma, + struct page *page, int writable) +{ + return entry; +} +#endif + static inline struct hstate *page_hstate(struct page *page) { return size_to_hstate(PAGE_SIZE << compound_order(page)); diff --git a/mm/hugetlb.c b/mm/hugetlb.c index ae8f708e3d75..4e28416c47fb 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2213,6 +2213,7 @@ static pte_t make_huge_pte(struct vm_area_struct *vma, struct page *page, } entry = pte_mkyoung(entry); entry = pte_mkhuge(entry); + entry = arch_make_huge_pte(entry, vma, page, writable); return entry; }