pagemap: pass mm into pagewalkers
We need this at least for huge page detection for now, because powerpc needs the vm_area_struct to be able to determine whether a virtual address is referring to a huge page (its pmd_huge() doesn't work). It might also come in handy for some of the other users. Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com> Acked-by: Matt Mackall <mpm@selenic.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
cfc53f65f5
commit
2165009bdf
@@ -760,16 +760,17 @@ unsigned long unmap_vmas(struct mmu_gather **tlb,
|
||||
* (see walk_page_range for more details)
|
||||
*/
|
||||
struct mm_walk {
|
||||
int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, void *);
|
||||
int (*pud_entry)(pud_t *, unsigned long, unsigned long, void *);
|
||||
int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, void *);
|
||||
int (*pte_entry)(pte_t *, unsigned long, unsigned long, void *);
|
||||
int (*pte_hole)(unsigned long, unsigned long, void *);
|
||||
int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, struct mm_walk *);
|
||||
int (*pud_entry)(pud_t *, unsigned long, unsigned long, struct mm_walk *);
|
||||
int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *);
|
||||
int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *);
|
||||
int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *);
|
||||
struct mm_struct *mm;
|
||||
void *private;
|
||||
};
|
||||
|
||||
int walk_page_range(const struct mm_struct *, unsigned long addr,
|
||||
unsigned long end, const struct mm_walk *walk,
|
||||
void *private);
|
||||
int walk_page_range(unsigned long addr, unsigned long end,
|
||||
struct mm_walk *walk);
|
||||
void free_pgd_range(struct mmu_gather **tlb, unsigned long addr,
|
||||
unsigned long end, unsigned long floor, unsigned long ceiling);
|
||||
void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma,
|
||||
|
Reference in New Issue
Block a user