diff options
author | Andrea Arcangeli <aarcange@redhat.com> | 2011-01-13 18:46:43 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 20:32:40 -0500 |
commit | 8ac1f8320a0073f28cf9e0491af4cd98f504f92a (patch) | |
tree | 4dad891c302587fdc7b099b18e05d7dbc5526c64 /arch/sparc/mm | |
parent | 64cc6ae001d70bc59e5f854e6b5678f59110df16 (diff) |
thp: pte alloc trans splitting
pte alloc routines must wait for split_huge_page if the pmd is not present
and not null (i.e. pmd_trans_splitting). The additional branches are
optimized away at compile time by pmd_trans_splitting if the config option
is off. However we must pass the vma down in order to know the anon_vma
lock to wait for.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Rik van Riel <riel@redhat.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sparc/mm')
-rw-r--r-- | arch/sparc/mm/generic_32.c | 2 | ||||
-rw-r--r-- | arch/sparc/mm/generic_64.c | 2 | ||||
-rw-r--r-- | arch/sparc/mm/hugetlbpage.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/arch/sparc/mm/generic_32.c b/arch/sparc/mm/generic_32.c index 5edcac184eaf..e6067b75f11c 100644 --- a/arch/sparc/mm/generic_32.c +++ b/arch/sparc/mm/generic_32.c | |||
@@ -50,7 +50,7 @@ static inline int io_remap_pmd_range(struct mm_struct *mm, pmd_t * pmd, unsigned | |||
50 | end = PGDIR_SIZE; | 50 | end = PGDIR_SIZE; |
51 | offset -= address; | 51 | offset -= address; |
52 | do { | 52 | do { |
53 | pte_t * pte = pte_alloc_map(mm, pmd, address); | 53 | pte_t *pte = pte_alloc_map(mm, NULL, pmd, address); |
54 | if (!pte) | 54 | if (!pte) |
55 | return -ENOMEM; | 55 | return -ENOMEM; |
56 | io_remap_pte_range(mm, pte, address, end - address, address + offset, prot, space); | 56 | io_remap_pte_range(mm, pte, address, end - address, address + offset, prot, space); |
diff --git a/arch/sparc/mm/generic_64.c b/arch/sparc/mm/generic_64.c index 04f2bf4cd571..3cb00dfd4bd6 100644 --- a/arch/sparc/mm/generic_64.c +++ b/arch/sparc/mm/generic_64.c | |||
@@ -92,7 +92,7 @@ static inline int io_remap_pmd_range(struct mm_struct *mm, pmd_t * pmd, unsigned | |||
92 | end = PGDIR_SIZE; | 92 | end = PGDIR_SIZE; |
93 | offset -= address; | 93 | offset -= address; |
94 | do { | 94 | do { |
95 | pte_t * pte = pte_alloc_map(mm, pmd, address); | 95 | pte_t *pte = pte_alloc_map(mm, NULL, pmd, address); |
96 | if (!pte) | 96 | if (!pte) |
97 | return -ENOMEM; | 97 | return -ENOMEM; |
98 | io_remap_pte_range(mm, pte, address, end - address, address + offset, prot, space); | 98 | io_remap_pte_range(mm, pte, address, end - address, address + offset, prot, space); |
diff --git a/arch/sparc/mm/hugetlbpage.c b/arch/sparc/mm/hugetlbpage.c index 5fdddf134caa..f4e97646ce23 100644 --- a/arch/sparc/mm/hugetlbpage.c +++ b/arch/sparc/mm/hugetlbpage.c | |||
@@ -214,7 +214,7 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, | |||
214 | if (pud) { | 214 | if (pud) { |
215 | pmd = pmd_alloc(mm, pud, addr); | 215 | pmd = pmd_alloc(mm, pud, addr); |
216 | if (pmd) | 216 | if (pmd) |
217 | pte = pte_alloc_map(mm, pmd, addr); | 217 | pte = pte_alloc_map(mm, NULL, pmd, addr); |
218 | } | 218 | } |
219 | return pte; | 219 | return pte; |
220 | } | 220 | } |