mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
mm: convert generic code to 5-level paging
Convert all non-architecture-specific code to 5-level paging. It's mostly mechanical adding handling one more page table level in places where we deal with pud_t. Signed-off-by: Kirill A. Shutemov <[email protected]> Acked-by: Michal Hocko <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
048456dcf2
commit
c2febafc67
23 changed files with 595 additions and 120 deletions
|
|
@ -128,19 +128,22 @@ out_unlock:
|
|||
static pmd_t *mm_alloc_pmd(struct mm_struct *mm, unsigned long address)
|
||||
{
|
||||
pgd_t *pgd;
|
||||
p4d_t *p4d;
|
||||
pud_t *pud;
|
||||
pmd_t *pmd = NULL;
|
||||
|
||||
pgd = pgd_offset(mm, address);
|
||||
pud = pud_alloc(mm, pgd, address);
|
||||
if (pud)
|
||||
/*
|
||||
* Note that we didn't run this because the pmd was
|
||||
* missing, the *pmd may be already established and in
|
||||
* turn it may also be a trans_huge_pmd.
|
||||
*/
|
||||
pmd = pmd_alloc(mm, pud, address);
|
||||
return pmd;
|
||||
p4d = p4d_alloc(mm, pgd, address);
|
||||
if (!p4d)
|
||||
return NULL;
|
||||
pud = pud_alloc(mm, p4d, address);
|
||||
if (!pud)
|
||||
return NULL;
|
||||
/*
|
||||
* Note that we didn't run this because the pmd was
|
||||
* missing, the *pmd may be already established and in
|
||||
* turn it may also be a trans_huge_pmd.
|
||||
*/
|
||||
return pmd_alloc(mm, pud, address);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HUGETLB_PAGE
|
||||
|
|
|
|||
Loading…
Reference in a new issue