mirror of https://github.com/torvalds/linux.git
arm64/mm: Rename try_pgd_pgtable_alloc_init_mm
With BUG_ON in pgd_pgtable_alloc_init_mm moved up to higher layer, gfp flags is the only difference between try_pgd_pgtable_alloc_init_mm and pgd_pgtable_alloc_init_mm. Hence rename the "try" version to pgd_pgtable_alloc_init_mm_gfp. Reviewed-by: Dev Jain <dev.jain@arm.com> Reviewed-by: Ryan Roberts <ryan.roberts@arm.com> Reviewed-by: Kevin Brodsky <kevin.brodsky@arm.com> Signed-off-by: Linu Cherian <linu.cherian@arm.com> Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
This commit is contained in:
parent
bfc184cb1b
commit
1b214452b6
|
|
@ -560,7 +560,7 @@ static phys_addr_t __pgd_pgtable_alloc(struct mm_struct *mm, gfp_t gfp,
|
||||||
}
|
}
|
||||||
|
|
||||||
static phys_addr_t
|
static phys_addr_t
|
||||||
try_pgd_pgtable_alloc_init_mm(enum pgtable_type pgtable_type, gfp_t gfp)
|
pgd_pgtable_alloc_init_mm_gfp(enum pgtable_type pgtable_type, gfp_t gfp)
|
||||||
{
|
{
|
||||||
return __pgd_pgtable_alloc(&init_mm, gfp, pgtable_type);
|
return __pgd_pgtable_alloc(&init_mm, gfp, pgtable_type);
|
||||||
}
|
}
|
||||||
|
|
@ -568,7 +568,7 @@ try_pgd_pgtable_alloc_init_mm(enum pgtable_type pgtable_type, gfp_t gfp)
|
||||||
static phys_addr_t __maybe_unused
|
static phys_addr_t __maybe_unused
|
||||||
pgd_pgtable_alloc_init_mm(enum pgtable_type pgtable_type)
|
pgd_pgtable_alloc_init_mm(enum pgtable_type pgtable_type)
|
||||||
{
|
{
|
||||||
return __pgd_pgtable_alloc(&init_mm, GFP_PGTABLE_KERNEL, pgtable_type);
|
return pgd_pgtable_alloc_init_mm_gfp(pgtable_type, GFP_PGTABLE_KERNEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static phys_addr_t
|
static phys_addr_t
|
||||||
|
|
@ -595,7 +595,7 @@ static int split_pmd(pmd_t *pmdp, pmd_t pmd, gfp_t gfp, bool to_cont)
|
||||||
pte_t *ptep;
|
pte_t *ptep;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
pte_phys = try_pgd_pgtable_alloc_init_mm(TABLE_PTE, gfp);
|
pte_phys = pgd_pgtable_alloc_init_mm_gfp(TABLE_PTE, gfp);
|
||||||
if (pte_phys == INVALID_PHYS_ADDR)
|
if (pte_phys == INVALID_PHYS_ADDR)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
ptep = (pte_t *)phys_to_virt(pte_phys);
|
ptep = (pte_t *)phys_to_virt(pte_phys);
|
||||||
|
|
@ -640,7 +640,7 @@ static int split_pud(pud_t *pudp, pud_t pud, gfp_t gfp, bool to_cont)
|
||||||
pmd_t *pmdp;
|
pmd_t *pmdp;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
pmd_phys = try_pgd_pgtable_alloc_init_mm(TABLE_PMD, gfp);
|
pmd_phys = pgd_pgtable_alloc_init_mm_gfp(TABLE_PMD, gfp);
|
||||||
if (pmd_phys == INVALID_PHYS_ADDR)
|
if (pmd_phys == INVALID_PHYS_ADDR)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
pmdp = (pmd_t *)phys_to_virt(pmd_phys);
|
pmdp = (pmd_t *)phys_to_virt(pmd_phys);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue