History

LoongArch: Fix the !THP build

Fix the !THP build by making pmd_pfn() available in all configurations. Because pmd_pfn() is used in mm/page_vma_mapped.c whether or not THP is configured.

Huacai Chen committed 4 years ago

Commit 501dcbe1 parent a111daf1 file · +5 −5Browse files

Unified · Split

arch/loongarch/include/asm/pgtable.h+5−5
@@ -426,6 +426,11 @@ static inline void update_mmu_cache_pmd(struct vm_area_struct *vma, · 425 unmodified lines
426 426
427#define kern_addr_valid(addr) (1)427#define kern_addr_valid(addr) (1)
428 428
429static inline unsigned long pmd_pfn(pmd_t pmd)
430{
431 return (pmd_val(pmd) & _PFN_MASK) >> _PFN_SHIFT;
432}
433
429#ifdef CONFIG_TRANSPARENT_HUGEPAGE434#ifdef CONFIG_TRANSPARENT_HUGEPAGE
430 435
431/* We don't have hardware dirty/accessed bits, generic_pmdp_establish is fine.*/436/* We don't have hardware dirty/accessed bits, generic_pmdp_establish is fine.*/
@@ -497,11 +502,6 @@ static inline pmd_t pmd_mkyoung(pmd_t pmd) · 65 unmodified lines
497 return pmd;502 return pmd;
498}503}
499 504
500static inline unsigned long pmd_pfn(pmd_t pmd)
501{
502 return (pmd_val(pmd) & _PFN_MASK) >> _PFN_SHIFT;
503}
504
505static inline struct page *pmd_page(pmd_t pmd)505static inline struct page *pmd_page(pmd_t pmd)
506{506{
507 if (pmd_trans_huge(pmd))507 if (pmd_trans_huge(pmd))