Lines Matching refs:phys_addr

179 __ioremap_caller(resource_size_t phys_addr, unsigned long size,  in __ioremap_caller()  argument
184 const resource_size_t unaligned_phys_addr = phys_addr; in __ioremap_caller()
194 last_addr = phys_addr + size - 1; in __ioremap_caller()
195 if (!size || last_addr < phys_addr) in __ioremap_caller()
198 if (!phys_addr_valid(phys_addr)) { in __ioremap_caller()
200 (unsigned long long)phys_addr); in __ioremap_caller()
205 __ioremap_check_mem(phys_addr, size, &io_desc); in __ioremap_caller()
212 &phys_addr, &last_addr); in __ioremap_caller()
219 offset = phys_addr & ~PAGE_MASK; in __ioremap_caller()
220 phys_addr &= PAGE_MASK; in __ioremap_caller()
221 size = PAGE_ALIGN(last_addr+1) - phys_addr; in __ioremap_caller()
227 phys_addr &= PHYSICAL_PAGE_MASK; in __ioremap_caller()
229 retval = memtype_reserve(phys_addr, (u64)phys_addr + size, in __ioremap_caller()
237 if (!is_new_memtype_allowed(phys_addr, size, pcm, new_pcm)) { in __ioremap_caller()
240 (unsigned long long)phys_addr, in __ioremap_caller()
241 (unsigned long long)(phys_addr + size), in __ioremap_caller()
290 area->phys_addr = phys_addr; in __ioremap_caller()
293 if (memtype_kernel_map_sync(phys_addr, size, pcm)) in __ioremap_caller()
296 if (ioremap_page_range(vaddr, vaddr + size, phys_addr, prot)) in __ioremap_caller()
313 memtype_free(phys_addr, phys_addr + size); in __ioremap_caller()
338 void __iomem *ioremap(resource_size_t phys_addr, unsigned long size) in ioremap() argument
350 return __ioremap_caller(phys_addr, size, pcm, in ioremap()
379 void __iomem *ioremap_uc(resource_size_t phys_addr, unsigned long size) in ioremap_uc() argument
383 return __ioremap_caller(phys_addr, size, pcm, in ioremap_uc()
398 void __iomem *ioremap_wc(resource_size_t phys_addr, unsigned long size) in ioremap_wc() argument
400 return __ioremap_caller(phys_addr, size, _PAGE_CACHE_MODE_WC, in ioremap_wc()
415 void __iomem *ioremap_wt(resource_size_t phys_addr, unsigned long size) in ioremap_wt() argument
417 return __ioremap_caller(phys_addr, size, _PAGE_CACHE_MODE_WT, in ioremap_wt()
422 void __iomem *ioremap_encrypted(resource_size_t phys_addr, unsigned long size) in ioremap_encrypted() argument
424 return __ioremap_caller(phys_addr, size, _PAGE_CACHE_MODE_WB, in ioremap_encrypted()
429 void __iomem *ioremap_cache(resource_size_t phys_addr, unsigned long size) in ioremap_cache() argument
431 return __ioremap_caller(phys_addr, size, _PAGE_CACHE_MODE_WB, in ioremap_cache()
436 void __iomem *ioremap_prot(resource_size_t phys_addr, unsigned long size, in ioremap_prot() argument
439 return __ioremap_caller(phys_addr, size, in ioremap_prot()
491 memtype_free(p->phys_addr, p->phys_addr + get_vm_area_size(p)); in iounmap()
537 static bool memremap_should_map_decrypted(resource_size_t phys_addr, in memremap_should_map_decrypted() argument
546 is_pmem = region_intersects(phys_addr, size, IORESOURCE_MEM, in memremap_should_map_decrypted()
556 switch (efi_mem_type(phys_addr)) { in memremap_should_map_decrypted()
558 if (efi_mem_attributes(phys_addr) & EFI_MEMORY_NV) in memremap_should_map_decrypted()
567 switch (e820__get_entry_type(phys_addr, phys_addr + size - 1)) { in memremap_should_map_decrypted()
590 static bool memremap_is_efi_data(resource_size_t phys_addr, in memremap_is_efi_data() argument
602 if (phys_addr == paddr) in memremap_is_efi_data()
608 if (phys_addr == paddr) in memremap_is_efi_data()
611 if (efi_is_table_address(phys_addr)) in memremap_is_efi_data()
614 switch (efi_mem_type(phys_addr)) { in memremap_is_efi_data()
629 static bool memremap_is_setup_data(resource_size_t phys_addr, in memremap_is_setup_data() argument
640 if (phys_addr == paddr) in memremap_is_setup_data()
653 if ((phys_addr > paddr) && (phys_addr < (paddr + len))) { in memremap_is_setup_data()
677 if ((phys_addr > paddr) && (phys_addr < (paddr + len))) in memremap_is_setup_data()
690 static bool __init early_memremap_is_setup_data(resource_size_t phys_addr, in early_memremap_is_setup_data() argument
701 if (phys_addr == paddr) in early_memremap_is_setup_data()
715 if ((phys_addr > paddr) && (phys_addr < (paddr + len))) { in early_memremap_is_setup_data()
739 if ((phys_addr > paddr) && (phys_addr < (paddr + len))) in early_memremap_is_setup_data()
753 bool arch_memremap_can_ram_remap(resource_size_t phys_addr, unsigned long size, in arch_memremap_can_ram_remap() argument
766 if (memremap_is_setup_data(phys_addr, size) || in arch_memremap_can_ram_remap()
767 memremap_is_efi_data(phys_addr, size)) in arch_memremap_can_ram_remap()
771 return !memremap_should_map_decrypted(phys_addr, size); in arch_memremap_can_ram_remap()
780 pgprot_t __init early_memremap_pgprot_adjust(resource_size_t phys_addr, in early_memremap_pgprot_adjust() argument
792 if (early_memremap_is_setup_data(phys_addr, size) || in early_memremap_pgprot_adjust()
793 memremap_is_efi_data(phys_addr, size)) in early_memremap_pgprot_adjust()
797 if (encrypted_prot && memremap_should_map_decrypted(phys_addr, size)) in early_memremap_pgprot_adjust()
804 bool phys_mem_access_encrypted(unsigned long phys_addr, unsigned long size) in phys_mem_access_encrypted() argument
806 return arch_memremap_can_ram_remap(phys_addr, size, 0); in phys_mem_access_encrypted()
810 void __init *early_memremap_encrypted(resource_size_t phys_addr, in early_memremap_encrypted() argument
813 return early_memremap_prot(phys_addr, size, __PAGE_KERNEL_ENC); in early_memremap_encrypted()
820 void __init *early_memremap_encrypted_wp(resource_size_t phys_addr, in early_memremap_encrypted_wp() argument
825 return early_memremap_prot(phys_addr, size, __PAGE_KERNEL_ENC_WP); in early_memremap_encrypted_wp()
829 void __init *early_memremap_decrypted(resource_size_t phys_addr, in early_memremap_decrypted() argument
832 return early_memremap_prot(phys_addr, size, __PAGE_KERNEL_NOENC); in early_memremap_decrypted()
839 void __init *early_memremap_decrypted_wp(resource_size_t phys_addr, in early_memremap_decrypted_wp() argument
844 return early_memremap_prot(phys_addr, size, __PAGE_KERNEL_NOENC_WP); in early_memremap_decrypted_wp()