diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kernel/smp.c | 2 | ||||
-rw-r--r-- | arch/arm/mm/ioremap.c | 2 | ||||
-rw-r--r-- | arch/arm/mm/pgd.c | 8 | ||||
-rw-r--r-- | arch/frv/mm/pgalloc.c | 2 | ||||
-rw-r--r-- | arch/powerpc/mm/pgtable_32.c | 6 | ||||
-rw-r--r-- | arch/ppc/mm/pgtable.c | 6 | ||||
-rw-r--r-- | arch/um/kernel/mem.c | 2 | ||||
-rw-r--r-- | arch/um/kernel/skas/mmu.c | 8 | ||||
-rw-r--r-- | arch/x86/mm/pgtable_32.c | 12 |
9 files changed, 24 insertions, 24 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index e9dfbab46cb6..eefae1de334c 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -150,7 +150,7 @@ int __cpuinit __cpu_up(unsigned int cpu) | |||
150 | secondary_data.pgdir = 0; | 150 | secondary_data.pgdir = 0; |
151 | 151 | ||
152 | *pmd_offset(pgd, PHYS_OFFSET) = __pmd(0); | 152 | *pmd_offset(pgd, PHYS_OFFSET) = __pmd(0); |
153 | pgd_free(pgd); | 153 | pgd_free(&init_mm, pgd); |
154 | 154 | ||
155 | if (ret) { | 155 | if (ret) { |
156 | printk(KERN_CRIT "CPU%u: processor failed to boot\n", cpu); | 156 | printk(KERN_CRIT "CPU%u: processor failed to boot\n", cpu); |
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 75952779ce19..303a7ff6bfd2 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -162,7 +162,7 @@ static void unmap_area_sections(unsigned long virt, unsigned long size) | |||
162 | * Free the page table, if there was one. | 162 | * Free the page table, if there was one. |
163 | */ | 163 | */ |
164 | if ((pmd_val(pmd) & PMD_TYPE_MASK) == PMD_TYPE_TABLE) | 164 | if ((pmd_val(pmd) & PMD_TYPE_MASK) == PMD_TYPE_TABLE) |
165 | pte_free_kernel(pmd_page_vaddr(pmd)); | 165 | pte_free_kernel(&init_mm, pmd_page_vaddr(pmd)); |
166 | } | 166 | } |
167 | 167 | ||
168 | addr += PGDIR_SIZE; | 168 | addr += PGDIR_SIZE; |
diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c index 50b9aed6000d..500c9610ab30 100644 --- a/arch/arm/mm/pgd.c +++ b/arch/arm/mm/pgd.c | |||
@@ -65,14 +65,14 @@ pgd_t *get_pgd_slow(struct mm_struct *mm) | |||
65 | return new_pgd; | 65 | return new_pgd; |
66 | 66 | ||
67 | no_pte: | 67 | no_pte: |
68 | pmd_free(new_pmd); | 68 | pmd_free(mm, new_pmd); |
69 | no_pmd: | 69 | no_pmd: |
70 | free_pages((unsigned long)new_pgd, 2); | 70 | free_pages((unsigned long)new_pgd, 2); |
71 | no_pgd: | 71 | no_pgd: |
72 | return NULL; | 72 | return NULL; |
73 | } | 73 | } |
74 | 74 | ||
75 | void free_pgd_slow(pgd_t *pgd) | 75 | void free_pgd_slow(struct mm_struct *mm, pgd_t *pgd) |
76 | { | 76 | { |
77 | pmd_t *pmd; | 77 | pmd_t *pmd; |
78 | struct page *pte; | 78 | struct page *pte; |
@@ -94,8 +94,8 @@ void free_pgd_slow(pgd_t *pgd) | |||
94 | pmd_clear(pmd); | 94 | pmd_clear(pmd); |
95 | dec_zone_page_state(virt_to_page((unsigned long *)pgd), NR_PAGETABLE); | 95 | dec_zone_page_state(virt_to_page((unsigned long *)pgd), NR_PAGETABLE); |
96 | pte_lock_deinit(pte); | 96 | pte_lock_deinit(pte); |
97 | pte_free(pte); | 97 | pte_free(mm, pte); |
98 | pmd_free(pmd); | 98 | pmd_free(mm, pmd); |
99 | free: | 99 | free: |
100 | free_pages((unsigned long) pgd, 2); | 100 | free_pages((unsigned long) pgd, 2); |
101 | } | 101 | } |
diff --git a/arch/frv/mm/pgalloc.c b/arch/frv/mm/pgalloc.c index 7787c3cc52c6..1a2e5c8d03a9 100644 --- a/arch/frv/mm/pgalloc.c +++ b/arch/frv/mm/pgalloc.c | |||
@@ -140,7 +140,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm) | |||
140 | return pgd; | 140 | return pgd; |
141 | } | 141 | } |
142 | 142 | ||
143 | void pgd_free(pgd_t *pgd) | 143 | void pgd_free(struct mm_struct *mm, pgd_t *pgd) |
144 | { | 144 | { |
145 | /* in the non-PAE case, clear_page_tables() clears user pgd entries */ | 145 | /* in the non-PAE case, clear_page_tables() clears user pgd entries */ |
146 | quicklist_free(0, pgd_dtor, pgd); | 146 | quicklist_free(0, pgd_dtor, pgd); |
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index 64488723162a..f80f90c4d58b 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c | |||
@@ -86,7 +86,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm) | |||
86 | return ret; | 86 | return ret; |
87 | } | 87 | } |
88 | 88 | ||
89 | void pgd_free(pgd_t *pgd) | 89 | void pgd_free(struct mm_struct *mm, pgd_t *pgd) |
90 | { | 90 | { |
91 | free_pages((unsigned long)pgd, PGDIR_ORDER); | 91 | free_pages((unsigned long)pgd, PGDIR_ORDER); |
92 | } | 92 | } |
@@ -123,7 +123,7 @@ struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) | |||
123 | return ptepage; | 123 | return ptepage; |
124 | } | 124 | } |
125 | 125 | ||
126 | void pte_free_kernel(pte_t *pte) | 126 | void pte_free_kernel(struct mm_struct *mm, pte_t *pte) |
127 | { | 127 | { |
128 | #ifdef CONFIG_SMP | 128 | #ifdef CONFIG_SMP |
129 | hash_page_sync(); | 129 | hash_page_sync(); |
@@ -131,7 +131,7 @@ void pte_free_kernel(pte_t *pte) | |||
131 | free_page((unsigned long)pte); | 131 | free_page((unsigned long)pte); |
132 | } | 132 | } |
133 | 133 | ||
134 | void pte_free(struct page *ptepage) | 134 | void pte_free(struct mm_struct *mm, struct page *ptepage) |
135 | { | 135 | { |
136 | #ifdef CONFIG_SMP | 136 | #ifdef CONFIG_SMP |
137 | hash_page_sync(); | 137 | hash_page_sync(); |
diff --git a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c index fadacfd18806..409fcaa4994a 100644 --- a/arch/ppc/mm/pgtable.c +++ b/arch/ppc/mm/pgtable.c | |||
@@ -74,7 +74,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm) | |||
74 | return ret; | 74 | return ret; |
75 | } | 75 | } |
76 | 76 | ||
77 | void pgd_free(pgd_t *pgd) | 77 | void pgd_free(struct mm_struct *mm, pgd_t *pgd) |
78 | { | 78 | { |
79 | free_pages((unsigned long)pgd, PGDIR_ORDER); | 79 | free_pages((unsigned long)pgd, PGDIR_ORDER); |
80 | } | 80 | } |
@@ -111,7 +111,7 @@ struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) | |||
111 | return ptepage; | 111 | return ptepage; |
112 | } | 112 | } |
113 | 113 | ||
114 | void pte_free_kernel(pte_t *pte) | 114 | void pte_free_kernel(struct mm_struct *mm, pte_t *pte) |
115 | { | 115 | { |
116 | #ifdef CONFIG_SMP | 116 | #ifdef CONFIG_SMP |
117 | hash_page_sync(); | 117 | hash_page_sync(); |
@@ -119,7 +119,7 @@ void pte_free_kernel(pte_t *pte) | |||
119 | free_page((unsigned long)pte); | 119 | free_page((unsigned long)pte); |
120 | } | 120 | } |
121 | 121 | ||
122 | void pte_free(struct page *ptepage) | 122 | void pte_free(struct mm_struct *mm, struct page *ptepage) |
123 | { | 123 | { |
124 | #ifdef CONFIG_SMP | 124 | #ifdef CONFIG_SMP |
125 | hash_page_sync(); | 125 | hash_page_sync(); |
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index 59822dee438a..e3e72418f241 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c | |||
@@ -348,7 +348,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm) | |||
348 | return pgd; | 348 | return pgd; |
349 | } | 349 | } |
350 | 350 | ||
351 | void pgd_free(pgd_t *pgd) | 351 | void pgd_free(struct mm_struct *mm, pgd_t *pgd) |
352 | { | 352 | { |
353 | free_page((unsigned long) pgd); | 353 | free_page((unsigned long) pgd); |
354 | } | 354 | } |
diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c index f859ec306cd5..b56fe8b67a81 100644 --- a/arch/um/kernel/skas/mmu.c +++ b/arch/um/kernel/skas/mmu.c | |||
@@ -58,9 +58,9 @@ static int init_stub_pte(struct mm_struct *mm, unsigned long proc, | |||
58 | return 0; | 58 | return 0; |
59 | 59 | ||
60 | out_pmd: | 60 | out_pmd: |
61 | pud_free(pud); | 61 | pud_free(mm, pud); |
62 | out_pte: | 62 | out_pte: |
63 | pmd_free(pmd); | 63 | pmd_free(mm, pmd); |
64 | out: | 64 | out: |
65 | return -ENOMEM; | 65 | return -ENOMEM; |
66 | } | 66 | } |
@@ -144,10 +144,10 @@ void destroy_context(struct mm_struct *mm) | |||
144 | if (!proc_mm || !ptrace_faultinfo) { | 144 | if (!proc_mm || !ptrace_faultinfo) { |
145 | free_page(mmu->id.stack); | 145 | free_page(mmu->id.stack); |
146 | pte_lock_deinit(virt_to_page(mmu->last_page_table)); | 146 | pte_lock_deinit(virt_to_page(mmu->last_page_table)); |
147 | pte_free_kernel((pte_t *) mmu->last_page_table); | 147 | pte_free_kernel(mm, (pte_t *) mmu->last_page_table); |
148 | dec_zone_page_state(virt_to_page(mmu->last_page_table), NR_PAGETABLE); | 148 | dec_zone_page_state(virt_to_page(mmu->last_page_table), NR_PAGETABLE); |
149 | #ifdef CONFIG_3_LEVEL_PGTABLES | 149 | #ifdef CONFIG_3_LEVEL_PGTABLES |
150 | pmd_free((pmd_t *) mmu->last_pmd); | 150 | pmd_free(mm, (pmd_t *) mmu->last_pmd); |
151 | #endif | 151 | #endif |
152 | } | 152 | } |
153 | 153 | ||
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 | */ |
275 | static void pgd_mop_up_pmds(pgd_t *pgdp) | 275 | static 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 | ||
336 | static void pgd_mop_up_pmds(pgd_t *pgd) | 336 | static 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 | ||
355 | void pgd_free(pgd_t *pgd) | 355 | void 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 | ||