aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-alpha/pgtable.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-alpha/pgtable.h')
-rw-r--r--include/asm-alpha/pgtable.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h
index 93eaa58b7961..49ac9bee7ced 100644
--- a/include/asm-alpha/pgtable.h
+++ b/include/asm-alpha/pgtable.h
@@ -230,16 +230,17 @@ extern inline void pgd_set(pgd_t * pgdp, pmd_t * pmdp)
230 230
231 231
232extern inline unsigned long 232extern inline unsigned long
233pmd_page_kernel(pmd_t pmd) 233pmd_page_vaddr(pmd_t pmd)
234{ 234{
235 return ((pmd_val(pmd) & _PFN_MASK) >> (32-PAGE_SHIFT)) + PAGE_OFFSET; 235 return ((pmd_val(pmd) & _PFN_MASK) >> (32-PAGE_SHIFT)) + PAGE_OFFSET;
236} 236}
237 237
238#ifndef CONFIG_DISCONTIGMEM 238#ifndef CONFIG_DISCONTIGMEM
239#define pmd_page(pmd) (mem_map + ((pmd_val(pmd) & _PFN_MASK) >> 32)) 239#define pmd_page(pmd) (mem_map + ((pmd_val(pmd) & _PFN_MASK) >> 32))
240#define pgd_page(pgd) (mem_map + ((pgd_val(pgd) & _PFN_MASK) >> 32))
240#endif 241#endif
241 242
242extern inline unsigned long pgd_page(pgd_t pgd) 243extern inline unsigned long pgd_page_vaddr(pgd_t pgd)
243{ return PAGE_OFFSET + ((pgd_val(pgd) & _PFN_MASK) >> (32-PAGE_SHIFT)); } 244{ return PAGE_OFFSET + ((pgd_val(pgd) & _PFN_MASK) >> (32-PAGE_SHIFT)); }
244 245
245extern inline int pte_none(pte_t pte) { return !pte_val(pte); } 246extern inline int pte_none(pte_t pte) { return !pte_val(pte); }
@@ -293,13 +294,13 @@ extern inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= __ACCESS_BITS; retu
293/* Find an entry in the second-level page table.. */ 294/* Find an entry in the second-level page table.. */
294extern inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address) 295extern inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address)
295{ 296{
296 return (pmd_t *) pgd_page(*dir) + ((address >> PMD_SHIFT) & (PTRS_PER_PAGE - 1)); 297 return (pmd_t *) pgd_page_vaddr(*dir) + ((address >> PMD_SHIFT) & (PTRS_PER_PAGE - 1));
297} 298}
298 299
299/* Find an entry in the third-level page table.. */ 300/* Find an entry in the third-level page table.. */
300extern inline pte_t * pte_offset_kernel(pmd_t * dir, unsigned long address) 301extern inline pte_t * pte_offset_kernel(pmd_t * dir, unsigned long address)
301{ 302{
302 return (pte_t *) pmd_page_kernel(*dir) 303 return (pte_t *) pmd_page_vaddr(*dir)
303 + ((address >> PAGE_SHIFT) & (PTRS_PER_PAGE - 1)); 304 + ((address >> PAGE_SHIFT) & (PTRS_PER_PAGE - 1));
304} 305}
305 306