Skip to content

Commit 501dcbe

Browse files
committed
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. Signed-off-by: Huacai Chen <[email protected]>
1 parent a111daf commit 501dcbe

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

arch/loongarch/include/asm/pgtable.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,11 @@ static inline void update_mmu_cache_pmd(struct vm_area_struct *vma,
426426

427427
#define kern_addr_valid(addr) (1)
428428

429+
static inline unsigned long pmd_pfn(pmd_t pmd)
430+
{
431+
return (pmd_val(pmd) & _PFN_MASK) >> _PFN_SHIFT;
432+
}
433+
429434
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
430435

431436
/* 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)
497502
return pmd;
498503
}
499504

500-
static inline unsigned long pmd_pfn(pmd_t pmd)
501-
{
502-
return (pmd_val(pmd) & _PFN_MASK) >> _PFN_SHIFT;
503-
}
504-
505505
static inline struct page *pmd_page(pmd_t pmd)
506506
{
507507
if (pmd_trans_huge(pmd))

0 commit comments

Comments
 (0)