[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] PAE pgd construction code should use clone_pgd_range().
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 72adf2025a9333546fdbe4a2dc49cccb87e699a4 # Parent 376d51321a3adce521e3646ac2703987c8a13f09 PAE pgd construction code should use clone_pgd_range(). Also fix the loop that allocates users pmds. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> diff -r 376d51321a3a -r 72adf2025a93 linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c --- a/linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c Fri Apr 21 09:14:07 2006 +0100 +++ b/linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c Fri Apr 21 09:37:22 2006 +0100 @@ -306,14 +306,14 @@ void pgd_ctor(void *pgd, kmem_cache_t *c BUG_ON(rc); } if (HAVE_SHARED_KERNEL_PMD) - memcpy((pgd_t *)pgd + USER_PTRS_PER_PGD, - swapper_pg_dir + USER_PTRS_PER_PGD, - (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); + clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD, + swapper_pg_dir + USER_PTRS_PER_PGD, + KERNEL_PGD_PTRS); } else { spin_lock_irqsave(&pgd_lock, flags); - memcpy((pgd_t *)pgd + USER_PTRS_PER_PGD, - swapper_pg_dir + USER_PTRS_PER_PGD, - (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); + clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD, + swapper_pg_dir + USER_PTRS_PER_PGD, + KERNEL_PGD_PTRS); memset(pgd, 0, USER_PTRS_PER_PGD*sizeof(pgd_t)); pgd_list_add(pgd); spin_unlock_irqrestore(&pgd_lock, flags); @@ -360,7 +360,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm) pmd_t *pmd = kmem_cache_alloc(pmd_cache, GFP_KERNEL); if (!pmd) goto out_oom; - set_pgd(&pgd[USER_PTRS_PER_PGD], __pgd(1 + __pa(pmd))); + set_pgd(&pgd[i], __pgd(1 + __pa(pmd))); } spin_lock_irqsave(&pgd_lock, flags); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |