diff options
author | Kirill A. Shutemov <[email protected]> | 2016-03-17 14:19:11 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2016-03-17 15:09:34 -0700 |
commit | 3ed3a4f0ddffece942bb2661924d87be4ce63cb7 (patch) | |
tree | 3b47bba0ba26a0301339f4989a57346e0f76b989 /arch/arm/mm/pgd.c | |
parent | 5057dcd0f1aaad57e07e728ba20a99e205c6b9de (diff) |
mm: cleanup *pte_alloc* interfaces
There are few things about *pte_alloc*() helpers worth cleaning up:
- 'vma' argument is unused, let's drop it;
- most __pte_alloc() callers do speculative check for pmd_none(),
before taking ptl: let's introduce pte_alloc() macro which does
the check.
The only direct user of __pte_alloc left is userfaultfd, which has
different expectation about atomicity wrt pmd.
- pte_alloc_map() and pte_alloc_map_lock() are redefined using
pte_alloc().
[[email protected]: fix build for arm64 hugetlbpage]
[[email protected]: fix arch/arm/mm/mmu.c some more]
Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: Dave Hansen <[email protected]>
Signed-off-by: Sudeep Holla <[email protected]>
Acked-by: Kirill A. Shutemov <[email protected]>
Signed-off-by: Stephen Rothwell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'arch/arm/mm/pgd.c')
-rw-r--r-- | arch/arm/mm/pgd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c index e683db1b90a3..b8d477321730 100644 --- a/arch/arm/mm/pgd.c +++ b/arch/arm/mm/pgd.c @@ -80,7 +80,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm) if (!new_pmd) goto no_pmd; - new_pte = pte_alloc_map(mm, NULL, new_pmd, 0); + new_pte = pte_alloc_map(mm, new_pmd, 0); if (!new_pte) goto no_pte; |