diff options
| author | Andrew Morton <akpm@osdl.org> | 2003-12-29 23:47:37 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-12-29 23:47:37 -0800 |
| commit | eb372d22cb6676e7f00a33889774b094392342a2 (patch) | |
| tree | 6d824304e9567b9fec64f83d9a133a3d3b22a526 /include | |
| parent | 17095c0720d64ca64d090bb4ac553c79dc9c4778 (diff) | |
[PATCH] hugepage pagetable freeing fix
From: "Seth, Rohit" <rohit.seth@intel.com>
We recently covered a bug in mm/mmap.c on IA-64. While unmapping a address
space, unmap_region calls free_pgtables to possibly free the pages that are
used for page tables. Currently no distinction is made between freeing a
region that is mapped by normal pages vs the pages that are mapped by
hugepages. Architecture specific code needs to handle cases where PTEs
corresponding to a region that is mapped by hugepages is properly getting
unmapped. Attached please find a patch that makes the required changes in
generic part of kernel. We will need to send a separate IA-64 patch to use
this new semantics. Currently, so not to disturb the PPC (as that is the
only arch that had ARCH_HAS_HUGEPAGE_ONLY_RANGE defined) we are mapping back
the definition of new function hugetlb_free_pgtables to free_pgtables.
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-ppc64/page.h | 1 | ||||
| -rw-r--r-- | include/linux/hugetlb.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-ppc64/page.h b/include/asm-ppc64/page.h index 29e5738f7180..5674054309ef 100644 --- a/include/asm-ppc64/page.h +++ b/include/asm-ppc64/page.h @@ -41,6 +41,7 @@ ( ((addr > (TASK_HPAGE_BASE-len)) && (addr < TASK_HPAGE_END)) || \ ((current->mm->context & CONTEXT_LOW_HPAGES) && \ (addr > (TASK_HPAGE_BASE_32-len)) && (addr < TASK_HPAGE_END_32)) ) +#define hugetlb_free_pgtables free_pgtables #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA #define in_hugepage_area(context, addr) \ diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index b3dd00de8dc3..72bda668895b 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -39,6 +39,7 @@ mark_mm_hugetlb(struct mm_struct *mm, struct vm_area_struct *vma) #ifndef ARCH_HAS_HUGEPAGE_ONLY_RANGE #define is_hugepage_only_range(addr, len) 0 +#define hugetlb_free_pgtables(tlb, prev, start, end) do { } while (0) #endif #else /* !CONFIG_HUGETLB_PAGE */ @@ -63,6 +64,7 @@ static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) #define is_aligned_hugepage_range(addr, len) 0 #define pmd_huge(x) 0 #define is_hugepage_only_range(addr, len) 0 +#define hugetlb_free_pgtables(tlb, prev, start, end) do { } while (0) #ifndef HPAGE_MASK #define HPAGE_MASK 0 /* Keep the compiler happy */ |
