aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/mm/pgtable.c2
-rw-r--r--arch/ia64/mm/hugetlbpage.c37
2 files changed, 3 insertions, 36 deletions
diff --git a/arch/i386/mm/pgtable.c b/arch/i386/mm/pgtable.c
index 0742d54f8bb0..dd81479ff88a 100644
--- a/arch/i386/mm/pgtable.c
+++ b/arch/i386/mm/pgtable.c
@@ -255,6 +255,6 @@ void pgd_free(pgd_t *pgd)
255 if (PTRS_PER_PMD > 1) 255 if (PTRS_PER_PMD > 1)
256 for (i = 0; i < USER_PTRS_PER_PGD; ++i) 256 for (i = 0; i < USER_PTRS_PER_PGD; ++i)
257 kmem_cache_free(pmd_cache, (void *)__va(pgd_val(pgd[i])-1)); 257 kmem_cache_free(pmd_cache, (void *)__va(pgd_val(pgd[i])-1));
258 /* in the non-PAE case, clear_page_range() clears user pgd entries */ 258 /* in the non-PAE case, free_pgtables() clears user pgd entries */
259 kmem_cache_free(pgd_cache, pgd); 259 kmem_cache_free(pgd_cache, pgd);
260} 260}
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c
index 40ad8328ffd5..626258ae9742 100644
--- a/arch/ia64/mm/hugetlbpage.c
+++ b/arch/ia64/mm/hugetlbpage.c
@@ -187,45 +187,12 @@ follow_huge_pmd(struct mm_struct *mm, unsigned long address, pmd_t *pmd, int wri
187} 187}
188 188
189/* 189/*
190 * Same as generic free_pgtables(), except constant PGDIR_* and pgd_offset 190 * Do nothing, until we've worked out what to do! To allow build, we
191 * are hugetlb region specific. 191 * must remove reference to clear_page_range since it no longer exists.
192 */ 192 */
193void hugetlb_free_pgtables(struct mmu_gather *tlb, struct vm_area_struct *prev, 193void hugetlb_free_pgtables(struct mmu_gather *tlb, struct vm_area_struct *prev,
194 unsigned long start, unsigned long end) 194 unsigned long start, unsigned long end)
195{ 195{
196 unsigned long first = start & HUGETLB_PGDIR_MASK;
197 unsigned long last = end + HUGETLB_PGDIR_SIZE - 1;
198 struct mm_struct *mm = tlb->mm;
199
200 if (!prev) {
201 prev = mm->mmap;
202 if (!prev)
203 goto no_mmaps;
204 if (prev->vm_end > start) {
205 if (last > prev->vm_start)
206 last = prev->vm_start;
207 goto no_mmaps;
208 }
209 }
210 for (;;) {
211 struct vm_area_struct *next = prev->vm_next;
212
213 if (next) {
214 if (next->vm_start < start) {
215 prev = next;
216 continue;
217 }
218 if (last > next->vm_start)
219 last = next->vm_start;
220 }
221 if (prev->vm_end > first)
222 first = prev->vm_end;
223 break;
224 }
225no_mmaps:
226 if (last < first) /* for arches with discontiguous pgd indices */
227 return;
228 clear_page_range(tlb, first, last);
229} 196}
230 197
231void unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) 198void unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)