diff options
Diffstat (limited to 'arch/i386/mm/pgtable.c')
-rw-r--r-- | arch/i386/mm/pgtable.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/i386/mm/pgtable.c b/arch/i386/mm/pgtable.c index bd2f7afc7a2a..dcdce2c6c532 100644 --- a/arch/i386/mm/pgtable.c +++ b/arch/i386/mm/pgtable.c | |||
@@ -207,19 +207,19 @@ void pgd_ctor(void *pgd, kmem_cache_t *cache, unsigned long unused) | |||
207 | { | 207 | { |
208 | unsigned long flags; | 208 | unsigned long flags; |
209 | 209 | ||
210 | if (PTRS_PER_PMD == 1) | 210 | if (PTRS_PER_PMD == 1) { |
211 | memset(pgd, 0, USER_PTRS_PER_PGD*sizeof(pgd_t)); | ||
211 | spin_lock_irqsave(&pgd_lock, flags); | 212 | spin_lock_irqsave(&pgd_lock, flags); |
213 | } | ||
212 | 214 | ||
213 | memcpy((pgd_t *)pgd + USER_PTRS_PER_PGD, | 215 | clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD, |
214 | swapper_pg_dir + USER_PTRS_PER_PGD, | 216 | swapper_pg_dir + USER_PTRS_PER_PGD, |
215 | (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); | 217 | KERNEL_PGD_PTRS); |
216 | |||
217 | if (PTRS_PER_PMD > 1) | 218 | if (PTRS_PER_PMD > 1) |
218 | return; | 219 | return; |
219 | 220 | ||
220 | pgd_list_add(pgd); | 221 | pgd_list_add(pgd); |
221 | spin_unlock_irqrestore(&pgd_lock, flags); | 222 | spin_unlock_irqrestore(&pgd_lock, flags); |
222 | memset(pgd, 0, USER_PTRS_PER_PGD*sizeof(pgd_t)); | ||
223 | } | 223 | } |
224 | 224 | ||
225 | /* never called when PTRS_PER_PMD > 1 */ | 225 | /* never called when PTRS_PER_PMD > 1 */ |