Skip to content

Commit aef13de

Browse files
author
Matthew Wilcox (Oracle)
committed
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) <[email protected]>
1 parent 9e996c2 commit aef13de

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

arch/sparc/include/asm/pgtable_32.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,16 @@ static inline int srmmu_device_memory(unsigned long x)
127127
return ((x & 0xF0000000) != 0);
128128
}
129129

130+
static inline unsigned long pmd_pfn(pmd_t pmd)
131+
{
132+
return (pmd_val(pmd) & SRMMU_PTD_PMASK) >> (PAGE_SHIFT-4);
133+
}
134+
130135
static inline struct page *pmd_page(pmd_t pmd)
131136
{
132137
if (srmmu_device_memory(pmd_val(pmd)))
133138
BUG();
134-
return pfn_to_page((pmd_val(pmd) & SRMMU_PTD_PMASK) >> (PAGE_SHIFT-4));
139+
return pfn_to_page(pmd_pfn(pmd));
135140
}
136141

137142
static inline unsigned long __pmd_page(pmd_t pmd)

0 commit comments

Comments
 (0)