diff options
Diffstat (limited to 'arch/x86/mm/pgtable_32.c')
-rw-r--r-- | arch/x86/mm/pgtable_32.c | 19 |
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 | */ |
208 | DEFINE_SPINLOCK(pgd_lock); | ||
209 | struct page *pgd_list; | ||
210 | |||
211 | static inline void pgd_list_add(pgd_t *pgd) | 208 | static 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 | ||
221 | static inline void pgd_list_del(pgd_t *pgd) | 215 | static 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 | ||