diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-28 15:14:43 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-28 15:14:43 -0400 |
commit | 414f746d232d41ed6ae8632c4495ae795373c44b (patch) | |
tree | 167f9bc8f139c6e82e6732b38c7a938b8a9d31cd /arch/powerpc/mm/hugetlbpage.c | |
parent | 5a7a201c51c324876d00a54e7208af6af12d1ca4 (diff) | |
parent | c9272c4f9fbe2087beb3392f526dc5b19efaa56b (diff) |
Merge branch 'linus' into cpus4096
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)); |