diff options
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)); |