Skip to content

Commit 177bd2a

Browse files
author
Matthew Wilcox (Oracle)
committed
mips: Make pmd_pfn() available in all configurations
Whether or not the platform supports PMD sized pages, we need to provide pmd_pfn() for an upcoming patch. Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
1 parent 7106c51 commit 177bd2a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

arch/mips/include/asm/pgtable.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ extern void paging_init(void);
8686
*/
8787
#define pmd_phys(pmd) virt_to_phys((void *)pmd_val(pmd))
8888

89+
static inline unsigned long pmd_pfn(pmd_t pmd)
90+
{
91+
return pmd_val(pmd) >> _PFN_SHIFT;
92+
}
93+
8994
#ifndef CONFIG_MIPS_HUGE_TLB_SUPPORT
9095
#define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT))
9196
#endif /* CONFIG_MIPS_HUGE_TLB_SUPPORT */
@@ -422,11 +427,6 @@ static inline int pmd_write(pmd_t pmd)
422427
return !!(pmd_val(pmd) & _PAGE_WRITE);
423428
}
424429

425-
static inline unsigned long pmd_pfn(pmd_t pmd)
426-
{
427-
return pmd_val(pmd) >> _PFN_SHIFT;
428-
}
429-
430430
static inline struct page *pmd_page(pmd_t pmd)
431431
{
432432
if (pmd_val(pmd) & _PAGE_HUGE)

0 commit comments

Comments
 (0)