@@ -233,6 +233,7 @@ static inline spinlock_t *pud_trans_huge_lock(pud_t *pud,
#define hpage_nr_pages(page) (long)compound_nr(page)
#define thp_size(page) page_size(page)
+#define thp_order(page) compound_order(page)
struct page *follow_devmap_pmd(struct vm_area_struct *vma, unsigned long addr,
pmd_t *pmd, int flags, struct dev_pagemap **pgmap);
@@ -288,6 +289,7 @@ static inline struct list_head *page_deferred_list(struct page *page)
#define hpage_nr_pages(x) 1L
#define thp_size(x) PAGE_SIZE
+#define thp_order(x) 0U
static inline bool __transparent_hugepage_enabled(struct vm_area_struct *vma)
{