summaryrefslogtreecommitdiffstats
path: root/arch/arm64/mm
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-06-29 14:51:30 +0200
committerCatalin Marinas <catalin.marinas@arm.com>2016-07-01 11:56:27 +0100
commit40f87d3114b8a1e730ac8f3dc3cf1efe33124776 (patch)
tree5258b159e7baf78cc865ec3c25e3998a6a13d853 /arch/arm64/mm
parent4133af6c0419b5a2a4da245ff7af7ceca7fd740d (diff)
downloadop-kernel-dev-40f87d3114b8a1e730ac8f3dc3cf1efe33124776.zip
op-kernel-dev-40f87d3114b8a1e730ac8f3dc3cf1efe33124776.tar.gz
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: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/mm')
-rw-r--r--arch/arm64/mm/mmu.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index 9d2d7cf..a96a241 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -239,16 +239,14 @@ static void alloc_init_pud(pgd_t *pgd, unsigned long addr, unsigned long end,
pud_clear_fixmap();
}
-/*
- * Create the page directory entries and any necessary page tables for the
- * mapping specified by 'md'.
- */
-static void init_pgd(pgd_t *pgd, phys_addr_t phys, unsigned long virt,
- phys_addr_t size, pgprot_t prot,
- phys_addr_t (*pgtable_alloc)(void),
- bool allow_block_mappings)
+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 (*pgtable_alloc)(void),
+ bool allow_block_mappings)
{
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
@@ -280,16 +278,6 @@ static phys_addr_t late_pgtable_alloc(void)
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,
* without allocating new levels of table. Note that this permits the
OpenPOWER on IntegriCloud