diff options
Diffstat (limited to 'include/asm-x86_64/pgtable.h')
-rw-r--r-- | include/asm-x86_64/pgtable.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index 7309fffeec9a..ecf58c7c1650 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
@@ -16,6 +16,7 @@ extern pud_t level3_physmem_pgt[512]; | |||
16 | extern pud_t level3_ident_pgt[512]; | 16 | extern pud_t level3_ident_pgt[512]; |
17 | extern pmd_t level2_kernel_pgt[512]; | 17 | extern pmd_t level2_kernel_pgt[512]; |
18 | extern pgd_t init_level4_pgt[]; | 18 | extern pgd_t init_level4_pgt[]; |
19 | extern pgd_t boot_level4_pgt[]; | ||
19 | extern unsigned long __supported_pte_mask; | 20 | extern unsigned long __supported_pte_mask; |
20 | 21 | ||
21 | #define swapper_pg_dir init_level4_pgt | 22 | #define swapper_pg_dir init_level4_pgt |
@@ -247,7 +248,7 @@ static inline unsigned long pud_bad(pud_t pud) | |||
247 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) /* FIXME: is this | 248 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) /* FIXME: is this |
248 | right? */ | 249 | right? */ |
249 | #define pte_page(x) pfn_to_page(pte_pfn(x)) | 250 | #define pte_page(x) pfn_to_page(pte_pfn(x)) |
250 | #define pte_pfn(x) ((pte_val(x) >> PAGE_SHIFT) & __PHYSICAL_MASK) | 251 | #define pte_pfn(x) ((pte_val(x) & __PHYSICAL_MASK) >> PAGE_SHIFT) |
251 | 252 | ||
252 | static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot) | 253 | static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot) |
253 | { | 254 | { |
@@ -354,7 +355,7 @@ static inline pud_t *__pud_offset_k(pud_t *pud, unsigned long address) | |||
354 | #define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0) | 355 | #define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0) |
355 | #define pmd_bad(x) ((pmd_val(x) & (~PTE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE ) | 356 | #define pmd_bad(x) ((pmd_val(x) & (~PTE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE ) |
356 | #define pfn_pmd(nr,prot) (__pmd(((nr) << PAGE_SHIFT) | pgprot_val(prot))) | 357 | #define pfn_pmd(nr,prot) (__pmd(((nr) << PAGE_SHIFT) | pgprot_val(prot))) |
357 | #define pmd_pfn(x) ((pmd_val(x) >> PAGE_SHIFT) & __PHYSICAL_MASK) | 358 | #define pmd_pfn(x) ((pmd_val(x) & __PHYSICAL_MASK) >> PAGE_SHIFT) |
358 | 359 | ||
359 | #define pte_to_pgoff(pte) ((pte_val(pte) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT) | 360 | #define pte_to_pgoff(pte) ((pte_val(pte) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT) |
360 | #define pgoff_to_pte(off) ((pte_t) { ((off) << PAGE_SHIFT) | _PAGE_FILE }) | 361 | #define pgoff_to_pte(off) ((pte_t) { ((off) << PAGE_SHIFT) | _PAGE_FILE }) |