diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-01-30 07:33:39 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:33:39 -0500 |
commit | 6c435456dc91ace468b4e9d72ad0e13dafa22a45 (patch) | |
tree | febb56da4b1acb6dfae230290ce5638d3fbcaaab /arch/x86/mm/pgtable_32.c | |
parent | a89780f3b84f9a421e2608580b55f12b3ac4f9c2 (diff) |
x86: add mm parameter to paravirt_alloc_pd
Add mm to paravirt_alloc_pd, partly to make it consistent with
paravirt_alloc_pt, and because later changes will make use of it.
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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c index be61a1d845a4..f85ee44720d2 100644 --- a/arch/x86/mm/pgtable_32.c +++ b/arch/x86/mm/pgtable_32.c | |||
@@ -330,13 +330,15 @@ pgd_t *pgd_alloc(struct mm_struct *mm) | |||
330 | if (PTRS_PER_PMD == 1 || !pgd) | 330 | if (PTRS_PER_PMD == 1 || !pgd) |
331 | return pgd; | 331 | return pgd; |
332 | 332 | ||
333 | mm->pgd = pgd; /* so that alloc_pd can use it */ | ||
334 | |||
333 | for (i = 0; i < UNSHARED_PTRS_PER_PGD; ++i) { | 335 | for (i = 0; i < UNSHARED_PTRS_PER_PGD; ++i) { |
334 | pmd_t *pmd = pmd_cache_alloc(i); | 336 | pmd_t *pmd = pmd_cache_alloc(i); |
335 | 337 | ||
336 | if (!pmd) | 338 | if (!pmd) |
337 | goto out_oom; | 339 | goto out_oom; |
338 | 340 | ||
339 | paravirt_alloc_pd(__pa(pmd) >> PAGE_SHIFT); | 341 | paravirt_alloc_pd(mm, __pa(pmd) >> PAGE_SHIFT); |
340 | set_pgd(&pgd[i], __pgd(1 + __pa(pmd))); | 342 | set_pgd(&pgd[i], __pgd(1 + __pa(pmd))); |
341 | } | 343 | } |
342 | return pgd; | 344 | return pgd; |