aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-alpha
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-alpha')
-rw-r--r--include/asm-alpha/mmzone.h1
-rw-r--r--include/asm-alpha/pgtable.h9
2 files changed, 6 insertions, 4 deletions
diff --git a/include/asm-alpha/mmzone.h b/include/asm-alpha/mmzone.h
index 64d0ab98fcd8..8af56ce346ad 100644
--- a/include/asm-alpha/mmzone.h
+++ b/include/asm-alpha/mmzone.h
@@ -75,6 +75,7 @@ PLAT_NODE_DATA_LOCALNR(unsigned long p, int n)
75#define VALID_PAGE(page) (((page) - mem_map) < max_mapnr) 75#define VALID_PAGE(page) (((page) - mem_map) < max_mapnr)
76 76
77#define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> 32)) 77#define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> 32))
78#define pgd_page(pgd) (pfn_to_page(pgd_val(pgd) >> 32))
78#define pte_pfn(pte) (pte_val(pte) >> 32) 79#define pte_pfn(pte) (pte_val(pte) >> 32)
79 80
80#define mk_pte(page, pgprot) \ 81#define mk_pte(page, pgprot) \
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