diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2008-07-25 10:40:14 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-07-25 10:40:14 -0400 |
commit | ff877ea80efa2015b6263766f78ee42c2a1b32f9 (patch) | |
tree | 85205005c611ab774702148558321c6fb92f1ccd /include/asm-x86/pgtable_32.h | |
parent | 30821fee4f0cb3e6d241d9f7ddc37742212e3eb7 (diff) | |
parent | d37e6bf68fc1eb34a4ad21d9ae8890ed37ea80e7 (diff) |
Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6
Diffstat (limited to 'include/asm-x86/pgtable_32.h')
-rw-r--r-- | include/asm-x86/pgtable_32.h | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h index 32ca03109a4c..5c3b26567a95 100644 --- a/include/asm-x86/pgtable_32.h +++ b/include/asm-x86/pgtable_32.h | |||
@@ -88,7 +88,7 @@ extern unsigned long pg0[]; | |||
88 | /* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ | 88 | /* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ |
89 | #define pmd_none(x) (!(unsigned long)pmd_val((x))) | 89 | #define pmd_none(x) (!(unsigned long)pmd_val((x))) |
90 | #define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT) | 90 | #define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT) |
91 | #define pmd_bad(x) ((pmd_val(x) & (~PTE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) | 91 | #define pmd_bad(x) ((pmd_val(x) & (PTE_FLAGS_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) |
92 | 92 | ||
93 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) | 93 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) |
94 | 94 | ||
@@ -113,26 +113,6 @@ extern unsigned long pg0[]; | |||
113 | */ | 113 | */ |
114 | #define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) | 114 | #define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) |
115 | 115 | ||
116 | /* | ||
117 | * the pgd page can be thought of an array like this: pgd_t[PTRS_PER_PGD] | ||
118 | * | ||
119 | * this macro returns the index of the entry in the pgd page which would | ||
120 | * control the given virtual address | ||
121 | */ | ||
122 | #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1)) | ||
123 | #define pgd_index_k(addr) pgd_index((addr)) | ||
124 | |||
125 | /* | ||
126 | * pgd_offset() returns a (pgd_t *) | ||
127 | * pgd_index() is used get the offset into the pgd page's array of pgd_t's; | ||
128 | */ | ||
129 | #define pgd_offset(mm, address) ((mm)->pgd + pgd_index((address))) | ||
130 | |||
131 | /* | ||
132 | * a shortcut which implies the use of the kernel's pgd, instead | ||
133 | * of a process's | ||
134 | */ | ||
135 | #define pgd_offset_k(address) pgd_offset(&init_mm, (address)) | ||
136 | 116 | ||
137 | static inline int pud_large(pud_t pud) { return 0; } | 117 | static inline int pud_large(pud_t pud) { return 0; } |
138 | 118 | ||
@@ -159,7 +139,7 @@ static inline int pud_large(pud_t pud) { return 0; } | |||
159 | #define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT)) | 139 | #define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT)) |
160 | 140 | ||
161 | #define pmd_page_vaddr(pmd) \ | 141 | #define pmd_page_vaddr(pmd) \ |
162 | ((unsigned long)__va(pmd_val((pmd)) & PTE_MASK)) | 142 | ((unsigned long)__va(pmd_val((pmd)) & PTE_PFN_MASK)) |
163 | 143 | ||
164 | #if defined(CONFIG_HIGHPTE) | 144 | #if defined(CONFIG_HIGHPTE) |
165 | #define pte_offset_map(dir, address) \ | 145 | #define pte_offset_map(dir, address) \ |
@@ -191,21 +171,6 @@ do { \ | |||
191 | */ | 171 | */ |
192 | #define update_mmu_cache(vma, address, pte) do { } while (0) | 172 | #define update_mmu_cache(vma, address, pte) do { } while (0) |
193 | 173 | ||
194 | extern void native_pagetable_setup_start(pgd_t *base); | ||
195 | extern void native_pagetable_setup_done(pgd_t *base); | ||
196 | |||
197 | #ifndef CONFIG_PARAVIRT | ||
198 | static inline void __init paravirt_pagetable_setup_start(pgd_t *base) | ||
199 | { | ||
200 | native_pagetable_setup_start(base); | ||
201 | } | ||
202 | |||
203 | static inline void __init paravirt_pagetable_setup_done(pgd_t *base) | ||
204 | { | ||
205 | native_pagetable_setup_done(base); | ||
206 | } | ||
207 | #endif /* !CONFIG_PARAVIRT */ | ||
208 | |||
209 | #endif /* !__ASSEMBLY__ */ | 174 | #endif /* !__ASSEMBLY__ */ |
210 | 175 | ||
211 | /* | 176 | /* |