Lines Matching defs:size
44 int ioremap_change_attr(unsigned long vaddr, unsigned long size,
47 unsigned long nrpages = size >> PAGE_SHIFT;
155 static void __ioremap_check_mem(resource_size_t addr, unsigned long size,
161 end = start + size - 1;
172 * the physical address is aligned by a huge page size (1GB or 2MB) and
173 * the requested size is at least the huge page size.
184 __ioremap_caller(resource_size_t phys_addr, unsigned long size,
190 const unsigned long unaligned_size = size;
198 /* Don't allow wraparound or zero size */
199 last_addr = phys_addr + size - 1;
200 if (!size || last_addr < phys_addr)
210 __ioremap_check_mem(phys_addr, size, &io_desc);
226 size = PAGE_ALIGN(last_addr+1) - phys_addr;
234 retval = memtype_reserve(phys_addr, (u64)phys_addr + size,
242 if (!is_new_memtype_allowed(phys_addr, size, pcm, new_pcm)) {
246 (unsigned long long)(phys_addr + size),
292 area = get_vm_area_caller(size, VM_IOREMAP, caller);
298 if (memtype_kernel_map_sync(phys_addr, size, pcm))
301 if (ioremap_page_range(vaddr, vaddr + size, phys_addr, prot))
318 memtype_free(phys_addr, phys_addr + size);
325 * @size: size of the resource to map
343 void __iomem *ioremap(resource_size_t phys_addr, unsigned long size)
355 return __ioremap_caller(phys_addr, size, pcm,
363 * @size: size of the resource to map
384 void __iomem *ioremap_uc(resource_size_t phys_addr, unsigned long size)
388 return __ioremap_caller(phys_addr, size, pcm,
396 * @size: size of the resource to map
403 void __iomem *ioremap_wc(resource_size_t phys_addr, unsigned long size)
405 return __ioremap_caller(phys_addr, size, _PAGE_CACHE_MODE_WC,
413 * @size: size of the resource to map
420 void __iomem *ioremap_wt(resource_size_t phys_addr, unsigned long size)
422 return __ioremap_caller(phys_addr, size, _PAGE_CACHE_MODE_WT,
427 void __iomem *ioremap_encrypted(resource_size_t phys_addr, unsigned long size)
429 return __ioremap_caller(phys_addr, size, _PAGE_CACHE_MODE_WB,
434 void __iomem *ioremap_cache(resource_size_t phys_addr, unsigned long size)
436 return __ioremap_caller(phys_addr, size, _PAGE_CACHE_MODE_WB,
441 void __iomem *ioremap_prot(resource_size_t phys_addr, unsigned long size,
444 return __ioremap_caller(phys_addr, size,
543 unsigned long size)
551 is_pmem = region_intersects(phys_addr, size, IORESOURCE_MEM,
572 switch (e820__get_entry_type(phys_addr, phys_addr + size - 1)) {
596 unsigned long size)
635 unsigned long size)
696 unsigned long size)
704 unsigned int len, size;
715 size = sizeof(*data);
726 size += len;
728 data = early_memremap_decrypted(paddr, size);
742 early_memunmap(data, size);
758 bool arch_memremap_can_ram_remap(resource_size_t phys_addr, unsigned long size,
771 if (memremap_is_setup_data(phys_addr, size) ||
772 memremap_is_efi_data(phys_addr, size))
776 return !memremap_should_map_decrypted(phys_addr, size);
786 unsigned long size,
797 if (early_memremap_is_setup_data(phys_addr, size) ||
798 memremap_is_efi_data(phys_addr, size))
802 if (encrypted_prot && memremap_should_map_decrypted(phys_addr, size))
809 bool phys_mem_access_encrypted(unsigned long phys_addr, unsigned long size)
811 return arch_memremap_can_ram_remap(phys_addr, size, 0);
816 unsigned long size)
818 return early_memremap_prot(phys_addr, size, __PAGE_KERNEL_ENC);
826 unsigned long size)
830 return early_memremap_prot(phys_addr, size, __PAGE_KERNEL_ENC_WP);
835 unsigned long size)
837 return early_memremap_prot(phys_addr, size, __PAGE_KERNEL_NOENC);
845 unsigned long size)
849 return early_memremap_prot(phys_addr, size, __PAGE_KERNEL_NOENC_WP);