diff options
Diffstat (limited to 'arch/x86/mm/pgtable.c')
| -rw-r--r-- | arch/x86/mm/pgtable.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c index 557b2abceef8..86f2ffc43c3d 100644 --- a/arch/x86/mm/pgtable.c +++ b/arch/x86/mm/pgtable.c | |||
| @@ -63,10 +63,8 @@ static inline void pgd_list_del(pgd_t *pgd) | |||
| 63 | #define UNSHARED_PTRS_PER_PGD \ | 63 | #define UNSHARED_PTRS_PER_PGD \ |
| 64 | (SHARED_KERNEL_PMD ? KERNEL_PGD_BOUNDARY : PTRS_PER_PGD) | 64 | (SHARED_KERNEL_PMD ? KERNEL_PGD_BOUNDARY : PTRS_PER_PGD) |
| 65 | 65 | ||
| 66 | static void pgd_ctor(void *p) | 66 | static void pgd_ctor(pgd_t *pgd) |
| 67 | { | 67 | { |
| 68 | pgd_t *pgd = p; | ||
| 69 | |||
| 70 | /* If the pgd points to a shared pagetable level (either the | 68 | /* If the pgd points to a shared pagetable level (either the |
| 71 | ptes in non-PAE, or shared PMD in PAE), then just copy the | 69 | ptes in non-PAE, or shared PMD in PAE), then just copy the |
| 72 | references from swapper_pg_dir. */ | 70 | references from swapper_pg_dir. */ |
| @@ -87,7 +85,7 @@ static void pgd_ctor(void *p) | |||
| 87 | pgd_list_add(pgd); | 85 | pgd_list_add(pgd); |
| 88 | } | 86 | } |
| 89 | 87 | ||
| 90 | static void pgd_dtor(void *pgd) | 88 | static void pgd_dtor(pgd_t *pgd) |
| 91 | { | 89 | { |
| 92 | unsigned long flags; /* can be called from interrupt context */ | 90 | unsigned long flags; /* can be called from interrupt context */ |
| 93 | 91 | ||
| @@ -207,6 +205,9 @@ static void pgd_prepopulate_pmd(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmds[]) | |||
| 207 | unsigned long addr; | 205 | unsigned long addr; |
| 208 | int i; | 206 | int i; |
| 209 | 207 | ||
| 208 | if (PREALLOCATED_PMDS == 0) /* Work around gcc-3.4.x bug */ | ||
| 209 | return; | ||
| 210 | |||
| 210 | pud = pud_offset(pgd, 0); | 211 | pud = pud_offset(pgd, 0); |
| 211 | 212 | ||
| 212 | for (addr = i = 0; i < PREALLOCATED_PMDS; | 213 | for (addr = i = 0; i < PREALLOCATED_PMDS; |
