mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 20:54:10 +08:00
sparc32: Add pmd_pfn()
We need to use this function in common code; pull it out of pmd_page(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
This commit is contained in:
parent
9e996c2115
commit
aef13dec0a
@ -127,11 +127,16 @@ static inline int srmmu_device_memory(unsigned long x)
|
||||
return ((x & 0xF0000000) != 0);
|
||||
}
|
||||
|
||||
static inline unsigned long pmd_pfn(pmd_t pmd)
|
||||
{
|
||||
return (pmd_val(pmd) & SRMMU_PTD_PMASK) >> (PAGE_SHIFT-4);
|
||||
}
|
||||
|
||||
static inline struct page *pmd_page(pmd_t pmd)
|
||||
{
|
||||
if (srmmu_device_memory(pmd_val(pmd)))
|
||||
BUG();
|
||||
return pfn_to_page((pmd_val(pmd) & SRMMU_PTD_PMASK) >> (PAGE_SHIFT-4));
|
||||
return pfn_to_page(pmd_pfn(pmd));
|
||||
}
|
||||
|
||||
static inline unsigned long __pmd_page(pmd_t pmd)
|
||||
|
Loading…
Reference in New Issue
Block a user