diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-07-25 22:45:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-26 15:00:07 -0400 |
commit | 51cc50685a4275c6a02653670af9f108a64e01cf (patch) | |
tree | 819d47bd2b0c8a9d1835d863853804b0a0242b97 /arch/powerpc/mm/hugetlbpage.c | |
parent | d91958815d214ea365b98cbff6215383897edcb6 (diff) |
SL*B: drop kmem cache argument from constructor
Kmem cache passed to constructor is only needed for constructors that are
themselves multiplexeres. Nobody uses this "feature", nor does anybody uses
passed kmem cache in non-trivial way, so pass only pointer to object.
Non-trivial places are:
arch/powerpc/mm/init_64.c
arch/powerpc/mm/hugetlbpage.c
This is flag day, yes.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Jon Tollefson <kniht@linux.vnet.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Matt Mackall <mpm@selenic.com>
[akpm@linux-foundation.org: fix arch/powerpc/mm/hugetlbpage.c]
[akpm@linux-foundation.org: fix mm/slab.c]
[akpm@linux-foundation.org: fix ubifs]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/powerpc/mm/hugetlbpage.c')
-rw-r--r-- | arch/powerpc/mm/hugetlbpage.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index fb42c4dd3217..ed0aab0208a6 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -113,7 +113,7 @@ static inline pte_t *hugepte_offset(hugepd_t *hpdp, unsigned long addr, | |||
113 | static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp, | 113 | static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp, |
114 | unsigned long address, unsigned int psize) | 114 | unsigned long address, unsigned int psize) |
115 | { | 115 | { |
116 | pte_t *new = kmem_cache_alloc(huge_pgtable_cache(psize), | 116 | pte_t *new = kmem_cache_zalloc(huge_pgtable_cache(psize), |
117 | GFP_KERNEL|__GFP_REPEAT); | 117 | GFP_KERNEL|__GFP_REPEAT); |
118 | 118 | ||
119 | if (! new) | 119 | if (! new) |
@@ -730,11 +730,6 @@ static int __init hugepage_setup_sz(char *str) | |||
730 | } | 730 | } |
731 | __setup("hugepagesz=", hugepage_setup_sz); | 731 | __setup("hugepagesz=", hugepage_setup_sz); |
732 | 732 | ||
733 | static void zero_ctor(struct kmem_cache *cache, void *addr) | ||
734 | { | ||
735 | memset(addr, 0, kmem_cache_size(cache)); | ||
736 | } | ||
737 | |||
738 | static int __init hugetlbpage_init(void) | 733 | static int __init hugetlbpage_init(void) |
739 | { | 734 | { |
740 | unsigned int psize; | 735 | unsigned int psize; |
@@ -756,7 +751,7 @@ static int __init hugetlbpage_init(void) | |||
756 | HUGEPTE_TABLE_SIZE(psize), | 751 | HUGEPTE_TABLE_SIZE(psize), |
757 | HUGEPTE_TABLE_SIZE(psize), | 752 | HUGEPTE_TABLE_SIZE(psize), |
758 | 0, | 753 | 0, |
759 | zero_ctor); | 754 | NULL); |
760 | if (!huge_pgtable_cache(psize)) | 755 | if (!huge_pgtable_cache(psize)) |
761 | panic("hugetlbpage_init(): could not create %s"\ | 756 | panic("hugetlbpage_init(): could not create %s"\ |
762 | "\n", HUGEPTE_CACHE_NAME(psize)); | 757 | "\n", HUGEPTE_CACHE_NAME(psize)); |