aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pgtable_32.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-02-05 01:29:14 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 12:44:18 -0500
commit5e5419734c8719cbc01af959ad9c0844002c0df5 (patch)
treea075dca3f719946689efa0245464855cbf2a20ce /arch/x86/mm/pgtable_32.c
parent9f8f2172537de7af0b0fbd33502d18d52b1339bc (diff)
add mm argument to pte/pmd/pud/pgd_free
(with Martin Schwidefsky <schwidefsky@de.ibm.com>) The pgd/pud/pmd/pte page table allocation functions get a mm_struct pointer as first argument. The free functions do not get the mm_struct argument. This is 1) asymmetrical and 2) to do mm related page table allocations the mm argument is needed on the free function as well. [kamalesh@linux.vnet.ibm.com: i386 fix] [akpm@linux-foundation.org: coding-syle fixes] Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/mm/pgtable_32.c')
-rw-r--r--arch/x86/mm/pgtable_32.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c
index c7db504be1ea..6c1914622a88 100644
--- a/arch/x86/mm/pgtable_32.c
+++ b/arch/x86/mm/pgtable_32.c
@@ -272,7 +272,7 @@ static void pgd_dtor(void *pgd)
272 * preallocate which never got a corresponding vma will need to be 272 * preallocate which never got a corresponding vma will need to be
273 * freed manually. 273 * freed manually.
274 */ 274 */
275static void pgd_mop_up_pmds(pgd_t *pgdp) 275static void pgd_mop_up_pmds(struct mm_struct *mm, pgd_t *pgdp)
276{ 276{
277 int i; 277 int i;
278 278
@@ -285,7 +285,7 @@ static void pgd_mop_up_pmds(pgd_t *pgdp)
285 pgdp[i] = native_make_pgd(0); 285 pgdp[i] = native_make_pgd(0);
286 286
287 paravirt_release_pd(pgd_val(pgd) >> PAGE_SHIFT); 287 paravirt_release_pd(pgd_val(pgd) >> PAGE_SHIFT);
288 pmd_free(pmd); 288 pmd_free(mm, pmd);
289 } 289 }
290 } 290 }
291} 291}
@@ -313,7 +313,7 @@ static int pgd_prepopulate_pmd(struct mm_struct *mm, pgd_t *pgd)
313 pmd_t *pmd = pmd_alloc_one(mm, addr); 313 pmd_t *pmd = pmd_alloc_one(mm, addr);
314 314
315 if (!pmd) { 315 if (!pmd) {
316 pgd_mop_up_pmds(pgd); 316 pgd_mop_up_pmds(mm, pgd);
317 return 0; 317 return 0;
318 } 318 }
319 319
@@ -333,7 +333,7 @@ static int pgd_prepopulate_pmd(struct mm_struct *mm, pgd_t *pgd)
333 return 1; 333 return 1;
334} 334}
335 335
336static void pgd_mop_up_pmds(pgd_t *pgd) 336static void pgd_mop_up_pmds(struct mm_struct *mm, pgd_t *pgdp)
337{ 337{
338} 338}
339#endif /* CONFIG_X86_PAE */ 339#endif /* CONFIG_X86_PAE */
@@ -352,9 +352,9 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
352 return pgd; 352 return pgd;
353} 353}
354 354
355void pgd_free(pgd_t *pgd) 355void pgd_free(struct mm_struct *mm, pgd_t *pgd)
356{ 356{
357 pgd_mop_up_pmds(pgd); 357 pgd_mop_up_pmds(mm, pgd);
358 quicklist_free(0, pgd_dtor, pgd); 358 quicklist_free(0, pgd_dtor, pgd);
359} 359}
360 360