diff options
author | Dave Hansen <dave@linux.vnet.ibm.com> | 2008-06-12 18:21:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-06-12 21:05:41 -0400 |
commit | 2165009bdf63f79716a36ad545df14c3cdf958b7 (patch) | |
tree | 83d1735f2104b6b5158be56a362856ac1079861d /include | |
parent | cfc53f65f56f9f33c0cf522124045ac5a64076b3 (diff) |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mm.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index c31a9cd2a30e..586a943cab01 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -760,16 +760,17 @@ unsigned long unmap_vmas(struct mmu_gather **tlb, | |||
760 | * (see walk_page_range for more details) | 760 | * (see walk_page_range for more details) |
761 | */ | 761 | */ |
762 | struct mm_walk { | 762 | struct mm_walk { |
763 | int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, void *); | 763 | int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, struct mm_walk *); |
764 | int (*pud_entry)(pud_t *, unsigned long, unsigned long, void *); | 764 | int (*pud_entry)(pud_t *, unsigned long, unsigned long, struct mm_walk *); |
765 | int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, void *); | 765 | int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *); |
766 | int (*pte_entry)(pte_t *, unsigned long, unsigned long, void *); | 766 | int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *); |
767 | int (*pte_hole)(unsigned long, unsigned long, void *); | 767 | int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *); |
768 | struct mm_struct *mm; | ||
769 | void *private; | ||
768 | }; | 770 | }; |
769 | 771 | ||
770 | int walk_page_range(const struct mm_struct *, unsigned long addr, | 772 | int walk_page_range(unsigned long addr, unsigned long end, |
771 | unsigned long end, const struct mm_walk *walk, | 773 | struct mm_walk *walk); |
772 | void *private); | ||
773 | void free_pgd_range(struct mmu_gather **tlb, unsigned long addr, | 774 | void free_pgd_range(struct mmu_gather **tlb, unsigned long addr, |
774 | unsigned long end, unsigned long floor, unsigned long ceiling); | 775 | unsigned long end, unsigned long floor, unsigned long ceiling); |
775 | void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma, | 776 | void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma, |