aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pgtable_32.c
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-01-30 07:34:11 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:34:11 -0500
commite3ed910db221768f8fd6192b13373e17d61bcdf0 (patch)
tree67a5eed4709a4b1b38e952af5bfc0340f78703af /arch/x86/mm/pgtable_32.c
parentfa28ba21cec24d3fa1279bcae7e5d5ff6224635a (diff)
x86: use the same pgd_list for PAE and 64-bit
Use a standard list threaded through page->lru for maintaining the pgd list on PAE. This is the same as 64-bit, and seems saner than using a non-standard list via page->index. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/mm/pgtable_32.c')
-rw-r--r--arch/x86/mm/pgtable_32.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c
index 5ca3552474ae..2ae5999a795a 100644
--- a/arch/x86/mm/pgtable_32.c
+++ b/arch/x86/mm/pgtable_32.c
@@ -205,27 +205,18 @@ struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)
205 * vmalloc faults work because attached pagetables are never freed. 205 * vmalloc faults work because attached pagetables are never freed.
206 * -- wli 206 * -- wli
207 */ 207 */
208DEFINE_SPINLOCK(pgd_lock);
209struct page *pgd_list;
210
211static inline void pgd_list_add(pgd_t *pgd) 208static inline void pgd_list_add(pgd_t *pgd)
212{ 209{
213 struct page *page = virt_to_page(pgd); 210 struct page *page = virt_to_page(pgd);
214 page->index = (unsigned long)pgd_list; 211
215 if (pgd_list) 212 list_add(&page->lru, &pgd_list);
216 set_page_private(pgd_list, (unsigned long)&page->index);
217 pgd_list = page;
218 set_page_private(page, (unsigned long)&pgd_list);
219} 213}
220 214
221static inline void pgd_list_del(pgd_t *pgd) 215static inline void pgd_list_del(pgd_t *pgd)
222{ 216{
223 struct page *next, **pprev, *page = virt_to_page(pgd); 217 struct page *page = virt_to_page(pgd);
224 next = (struct page *)page->index; 218
225 pprev = (struct page **)page_private(page); 219 list_del(&page->lru);
226 *pprev = next;
227 if (next)
228 set_page_private(next, (unsigned long)pprev);
229} 220}
230 221
231 222