aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/mm
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-06-29 08:51:30 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2016-07-01 06:56:27 -0400
commit40f87d3114b8a1e730ac8f3dc3cf1efe33124776 (patch)
tree5258b159e7baf78cc865ec3c25e3998a6a13d853 /arch/arm64/mm
parent4133af6c0419b5a2a4da245ff7af7ceca7fd740d (diff)
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 9d2d7cfb95b4..a96a2413fa18 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,
239 pud_clear_fixmap(); 239 pud_clear_fixmap();
240} 240}
241 241
242/* 242static void __create_pgd_mapping(pgd_t *pgdir, phys_addr_t phys,
243 * Create the page directory entries and any necessary page tables for the 243 unsigned long virt, phys_addr_t size,
244 * mapping specified by 'md'. 244 pgprot_t prot,
245 */ 245 phys_addr_t (*pgtable_alloc)(void),
246static void init_pgd(pgd_t *pgd, phys_addr_t phys, unsigned long virt, 246 bool allow_block_mappings)
247 phys_addr_t size, pgprot_t prot,
248 phys_addr_t (*pgtable_alloc)(void),
249 bool allow_block_mappings)
250{ 247{
251 unsigned long addr, length, end, next; 248 unsigned long addr, length, end, next;
249 pgd_t *pgd = pgd_offset_raw(pgdir, virt);
252 250
253 /* 251 /*
254 * If the virtual and physical address don't have the same offset 252 * 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 return __pa(ptr); 278 return __pa(ptr);
281} 279}
282 280
283static void __create_pgd_mapping(pgd_t *pgdir, phys_addr_t phys,
284 unsigned long virt, phys_addr_t size,
285 pgprot_t prot,
286 phys_addr_t (*alloc)(void),
287 bool allow_block_mappings)
288{
289 init_pgd(pgd_offset_raw(pgdir, virt), phys, virt, size, prot, alloc,
290 allow_block_mappings);
291}
292
293/* 281/*
294 * This function can only be used to modify existing table entries, 282 * This function can only be used to modify existing table entries,
295 * without allocating new levels of table. Note that this permits the 283 * without allocating new levels of table. Note that this permits the