Commit 40f87d31 authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Catalin Marinas

arm64: mm: fold init_pgd() into __create_pgd_mapping()

The routine __create_pgd_mapping() does nothing except calling init_pgd(),
which has no other callers. So fold the latter into the former. Also, drop
a comment that has gone stale.
Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 4133af6c
...@@ -239,16 +239,14 @@ static void alloc_init_pud(pgd_t *pgd, unsigned long addr, unsigned long end, ...@@ -239,16 +239,14 @@ static void alloc_init_pud(pgd_t *pgd, unsigned long addr, unsigned long end,
pud_clear_fixmap(); pud_clear_fixmap();
} }
/* static void __create_pgd_mapping(pgd_t *pgdir, phys_addr_t phys,
* Create the page directory entries and any necessary page tables for the unsigned long virt, phys_addr_t size,
* mapping specified by 'md'. pgprot_t prot,
*/ phys_addr_t (*pgtable_alloc)(void),
static void init_pgd(pgd_t *pgd, phys_addr_t phys, unsigned long virt, bool allow_block_mappings)
phys_addr_t size, pgprot_t prot,
phys_addr_t (*pgtable_alloc)(void),
bool allow_block_mappings)
{ {
unsigned long addr, length, end, next; unsigned long addr, length, end, next;
pgd_t *pgd = pgd_offset_raw(pgdir, virt);
/* /*
* If the virtual and physical address don't have the same offset * If the virtual and physical address don't have the same offset
...@@ -280,16 +278,6 @@ static phys_addr_t late_pgtable_alloc(void) ...@@ -280,16 +278,6 @@ static phys_addr_t late_pgtable_alloc(void)
return __pa(ptr); return __pa(ptr);
} }
static void __create_pgd_mapping(pgd_t *pgdir, phys_addr_t phys,
unsigned long virt, phys_addr_t size,
pgprot_t prot,
phys_addr_t (*alloc)(void),
bool allow_block_mappings)
{
init_pgd(pgd_offset_raw(pgdir, virt), phys, virt, size, prot, alloc,
allow_block_mappings);
}
/* /*
* This function can only be used to modify existing table entries, * This function can only be used to modify existing table entries,
* without allocating new levels of table. Note that this permits the * without allocating new levels of table. Note that this permits the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment