Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Ard Biesheuvel and committed by
Catalin Marinas
40f87d31 4133af6c

+6 -18
+6 -18
arch/arm64/mm/mmu.c
··· 239 239 pud_clear_fixmap(); 240 240 } 241 241 242 - /* 243 - * Create the page directory entries and any necessary page tables for the 244 - * mapping specified by 'md'. 245 - */ 246 - static void init_pgd(pgd_t *pgd, phys_addr_t phys, unsigned long virt, 247 - phys_addr_t size, pgprot_t prot, 248 - phys_addr_t (*pgtable_alloc)(void), 249 - bool allow_block_mappings) 242 + static void __create_pgd_mapping(pgd_t *pgdir, phys_addr_t phys, 243 + unsigned long virt, phys_addr_t size, 244 + pgprot_t prot, 245 + phys_addr_t (*pgtable_alloc)(void), 246 + bool allow_block_mappings) 250 247 { 251 248 unsigned long addr, length, end, next; 249 + pgd_t *pgd = pgd_offset_raw(pgdir, virt); 252 250 253 251 /* 254 252 * If the virtual and physical address don't have the same offset ··· 276 278 /* Ensure the zeroed page is visible to the page table walker */ 277 279 dsb(ishst); 278 280 return __pa(ptr); 279 - } 280 - 281 - static void __create_pgd_mapping(pgd_t *pgdir, phys_addr_t phys, 282 - unsigned long virt, phys_addr_t size, 283 - pgprot_t prot, 284 - phys_addr_t (*alloc)(void), 285 - bool allow_block_mappings) 286 - { 287 - init_pgd(pgd_offset_raw(pgdir, virt), phys, virt, size, prot, alloc, 288 - allow_block_mappings); 289 281 } 290 282 291 283 /*