Lines Matching refs:va

349 static inline phys_addr_t __init alloc_pte_early(uintptr_t va)  in alloc_pte_early()  argument
358 static inline phys_addr_t __init alloc_pte_fixmap(uintptr_t va) in alloc_pte_fixmap() argument
363 static phys_addr_t __init alloc_pte_late(uintptr_t va) in alloc_pte_late() argument
372 uintptr_t va, phys_addr_t pa, in create_pte_mapping() argument
375 uintptr_t pte_idx = pte_index(va); in create_pte_mapping()
432 static phys_addr_t __init alloc_pmd_early(uintptr_t va) in alloc_pmd_early() argument
434 BUG_ON((va - kernel_map.virt_addr) >> PUD_SHIFT); in alloc_pmd_early()
439 static phys_addr_t __init alloc_pmd_fixmap(uintptr_t va) in alloc_pmd_fixmap() argument
444 static phys_addr_t __init alloc_pmd_late(uintptr_t va) in alloc_pmd_late() argument
453 uintptr_t va, phys_addr_t pa, in create_pmd_mapping() argument
458 uintptr_t pmd_idx = pmd_index(va); in create_pmd_mapping()
467 pte_phys = pt_ops.alloc_pte(va); in create_pmd_mapping()
476 create_pte_mapping(ptep, va, pa, sz, prot); in create_pmd_mapping()
495 static phys_addr_t __init alloc_pud_early(uintptr_t va) in alloc_pud_early() argument
498 BUG_ON((va - kernel_map.virt_addr) >> PGDIR_SHIFT); in alloc_pud_early()
503 static phys_addr_t __init alloc_pud_fixmap(uintptr_t va) in alloc_pud_fixmap() argument
508 static phys_addr_t alloc_pud_late(uintptr_t va) in alloc_pud_late() argument
533 static phys_addr_t __init alloc_p4d_early(uintptr_t va) in alloc_p4d_early() argument
536 BUG_ON((va - kernel_map.virt_addr) >> PGDIR_SHIFT); in alloc_p4d_early()
541 static phys_addr_t __init alloc_p4d_fixmap(uintptr_t va) in alloc_p4d_fixmap() argument
546 static phys_addr_t alloc_p4d_late(uintptr_t va) in alloc_p4d_late() argument
556 uintptr_t va, phys_addr_t pa, in create_pud_mapping() argument
561 uintptr_t pud_index = pud_index(va); in create_pud_mapping()
570 next_phys = pt_ops.alloc_pmd(va); in create_pud_mapping()
579 create_pmd_mapping(nextp, va, pa, sz, prot); in create_pud_mapping()
583 uintptr_t va, phys_addr_t pa, in create_p4d_mapping() argument
588 uintptr_t p4d_index = p4d_index(va); in create_p4d_mapping()
597 next_phys = pt_ops.alloc_pud(va); in create_p4d_mapping()
606 create_pud_mapping(nextp, va, pa, sz, prot); in create_p4d_mapping()
641 uintptr_t va, phys_addr_t pa, in create_pgd_mapping() argument
646 uintptr_t pgd_idx = pgd_index(va); in create_pgd_mapping()
655 next_phys = alloc_pgd_next(va); in create_pgd_mapping()
664 create_pgd_next_mapping(nextp, va, pa, sz, prot); in create_pgd_mapping()
667 static uintptr_t __init best_map_size(phys_addr_t pa, uintptr_t va, in best_map_size() argument
670 if (!(pa & (PGDIR_SIZE - 1)) && !(va & (PGDIR_SIZE - 1)) && size >= PGDIR_SIZE) in best_map_size()
673 if (!(pa & (P4D_SIZE - 1)) && !(va & (P4D_SIZE - 1)) && size >= P4D_SIZE) in best_map_size()
676 if (!(pa & (PUD_SIZE - 1)) && !(va & (PUD_SIZE - 1)) && size >= PUD_SIZE) in best_map_size()
679 if (!(pa & (PMD_SIZE - 1)) && !(va & (PMD_SIZE - 1)) && size >= PMD_SIZE) in best_map_size()
701 static __init pgprot_t pgprot_from_va(uintptr_t va) in pgprot_from_va() argument
703 if (is_va_kernel_text(va)) in pgprot_from_va()
712 if (IS_ENABLED(CONFIG_64BIT) && is_va_kernel_lm_alias_text(va)) in pgprot_from_va()
728 static __init pgprot_t pgprot_from_va(uintptr_t va) in pgprot_from_va() argument
730 if (IS_ENABLED(CONFIG_64BIT) && !is_kernel_mapping(va)) in pgprot_from_va()
892 uintptr_t va, end_va; in create_kernel_page_table() local
896 for (va = kernel_map.virt_addr; va < end_va; va += PMD_SIZE) in create_kernel_page_table()
897 create_pgd_mapping(pgdir, va, in create_kernel_page_table()
898 kernel_map.xiprom + (va - kernel_map.virt_addr), in create_kernel_page_table()
903 for (va = kernel_map.virt_addr + XIP_OFFSET; va < end_va; va += PMD_SIZE) in create_kernel_page_table()
904 create_pgd_mapping(pgdir, va, in create_kernel_page_table()
905 kernel_map.phys_addr + (va - (kernel_map.virt_addr + XIP_OFFSET)), in create_kernel_page_table()
911 uintptr_t va, end_va; in create_kernel_page_table() local
914 for (va = kernel_map.virt_addr; va < end_va; va += PMD_SIZE) in create_kernel_page_table()
915 create_pgd_mapping(pgdir, va, in create_kernel_page_table()
916 kernel_map.phys_addr + (va - kernel_map.virt_addr), in create_kernel_page_table()
919 PAGE_KERNEL_EXEC : pgprot_from_va(va)); in create_kernel_page_table()
1219 uintptr_t va, map_size; in create_linear_mapping_range() local
1222 va = (uintptr_t)__va(pa); in create_linear_mapping_range()
1224 best_map_size(pa, va, end - pa); in create_linear_mapping_range()
1226 create_pgd_mapping(swapper_pg_dir, va, pa, map_size, in create_linear_mapping_range()
1227 pgprot_from_va(va)); in create_linear_mapping_range()