diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-02-05 01:29:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 12:44:18 -0500 |
commit | 5e5419734c8719cbc01af959ad9c0844002c0df5 (patch) | |
tree | a075dca3f719946689efa0245464855cbf2a20ce /include/asm-sparc64 | |
parent | 9f8f2172537de7af0b0fbd33502d18d52b1339bc (diff) |
add mm argument to pte/pmd/pud/pgd_free
(with Martin Schwidefsky <schwidefsky@de.ibm.com>)
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 <benh@kernel.crashing.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r-- | include/asm-sparc64/pgalloc.h | 8 | ||||
-rw-r--r-- | include/asm-sparc64/tlb.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h index 5d66b858a965..b48f73c2274e 100644 --- a/include/asm-sparc64/pgalloc.h +++ b/include/asm-sparc64/pgalloc.h | |||
@@ -20,7 +20,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm) | |||
20 | return quicklist_alloc(0, GFP_KERNEL, NULL); | 20 | return quicklist_alloc(0, GFP_KERNEL, NULL); |
21 | } | 21 | } |
22 | 22 | ||
23 | static inline void pgd_free(pgd_t *pgd) | 23 | static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) |
24 | { | 24 | { |
25 | quicklist_free(0, NULL, pgd); | 25 | quicklist_free(0, NULL, pgd); |
26 | } | 26 | } |
@@ -32,7 +32,7 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) | |||
32 | return quicklist_alloc(0, GFP_KERNEL, NULL); | 32 | return quicklist_alloc(0, GFP_KERNEL, NULL); |
33 | } | 33 | } |
34 | 34 | ||
35 | static inline void pmd_free(pmd_t *pmd) | 35 | static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) |
36 | { | 36 | { |
37 | quicklist_free(0, NULL, pmd); | 37 | quicklist_free(0, NULL, pmd); |
38 | } | 38 | } |
@@ -50,12 +50,12 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm, | |||
50 | return pg ? virt_to_page(pg) : NULL; | 50 | return pg ? virt_to_page(pg) : NULL; |
51 | } | 51 | } |
52 | 52 | ||
53 | static inline void pte_free_kernel(pte_t *pte) | 53 | static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) |
54 | { | 54 | { |
55 | quicklist_free(0, NULL, pte); | 55 | quicklist_free(0, NULL, pte); |
56 | } | 56 | } |
57 | 57 | ||
58 | static inline void pte_free(struct page *ptepage) | 58 | static inline void pte_free(struct mm_struct *mm, struct page *ptepage) |
59 | { | 59 | { |
60 | quicklist_free_page(0, NULL, ptepage); | 60 | quicklist_free_page(0, NULL, ptepage); |
61 | } | 61 | } |
diff --git a/include/asm-sparc64/tlb.h b/include/asm-sparc64/tlb.h index 349d1d3e9c27..ec81cdedef2c 100644 --- a/include/asm-sparc64/tlb.h +++ b/include/asm-sparc64/tlb.h | |||
@@ -100,8 +100,8 @@ static inline void tlb_remove_page(struct mmu_gather *mp, struct page *page) | |||
100 | } | 100 | } |
101 | 101 | ||
102 | #define tlb_remove_tlb_entry(mp,ptep,addr) do { } while (0) | 102 | #define tlb_remove_tlb_entry(mp,ptep,addr) do { } while (0) |
103 | #define pte_free_tlb(mp,ptepage) pte_free(ptepage) | 103 | #define pte_free_tlb(mp, ptepage) pte_free((mp)->mm, ptepage) |
104 | #define pmd_free_tlb(mp,pmdp) pmd_free(pmdp) | 104 | #define pmd_free_tlb(mp, pmdp) pmd_free((mp)->mm, pmdp) |
105 | #define pud_free_tlb(tlb,pudp) __pud_free_tlb(tlb,pudp) | 105 | #define pud_free_tlb(tlb,pudp) __pud_free_tlb(tlb,pudp) |
106 | 106 | ||
107 | #define tlb_migrate_finish(mm) do { } while (0) | 107 | #define tlb_migrate_finish(mm) do { } while (0) |