From 5e5419734c8719cbc01af959ad9c0844002c0df5 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Mon, 4 Feb 2008 22:29:14 -0800 Subject: add mm argument to pte/pmd/pud/pgd_free (with Martin Schwidefsky ) The pgd/pud/pmd/pte page table allocation functions get a mm_struct pointer as first argument. The free functions do not get the mm_struct argument. This is 1) asymmetrical and 2) to do mm related page table allocations the mm argument is needed on the free function as well. [kamalesh@linux.vnet.ibm.com: i386 fix] [akpm@linux-foundation.org: coding-syle fixes] Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Martin Schwidefsky Cc: Signed-off-by: Kamalesh Babulal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-ia64/pgalloc.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'include/asm-ia64') diff --git a/include/asm-ia64/pgalloc.h b/include/asm-ia64/pgalloc.h index 67552cad517..556d988123a 100644 --- a/include/asm-ia64/pgalloc.h +++ b/include/asm-ia64/pgalloc.h @@ -27,7 +27,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm) return quicklist_alloc(0, GFP_KERNEL, NULL); } -static inline void pgd_free(pgd_t * pgd) +static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) { quicklist_free(0, NULL, pgd); } @@ -44,11 +44,11 @@ static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr) return quicklist_alloc(0, GFP_KERNEL, NULL); } -static inline void pud_free(pud_t * pud) +static inline void pud_free(struct mm_struct *mm, pud_t *pud) { quicklist_free(0, NULL, pud); } -#define __pud_free_tlb(tlb, pud) pud_free(pud) +#define __pud_free_tlb(tlb, pud) pud_free((tlb)->mm, pud) #endif /* CONFIG_PGTABLE_4 */ static inline void @@ -62,12 +62,12 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) return quicklist_alloc(0, GFP_KERNEL, NULL); } -static inline void pmd_free(pmd_t * pmd) +static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) { quicklist_free(0, NULL, pmd); } -#define __pmd_free_tlb(tlb, pmd) pmd_free(pmd) +#define __pmd_free_tlb(tlb, pmd) pmd_free((tlb)->mm, pmd) static inline void pmd_populate(struct mm_struct *mm, pmd_t * pmd_entry, struct page *pte) @@ -94,12 +94,12 @@ static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, return quicklist_alloc(0, GFP_KERNEL, NULL); } -static inline void pte_free(struct page *pte) +static inline void pte_free(struct mm_struct *mm, struct page *pte) { quicklist_free_page(0, NULL, pte); } -static inline void pte_free_kernel(pte_t * pte) +static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) { quicklist_free(0, NULL, pte); } @@ -109,6 +109,6 @@ static inline void check_pgt_cache(void) quicklist_trim(0, NULL, 25, 16); } -#define __pte_free_tlb(tlb, pte) pte_free(pte) +#define __pte_free_tlb(tlb, pte) pte_free((tlb)->mm, pte) #endif /* _ASM_IA64_PGALLOC_H */ -- cgit v1.2.3