/openbmc/linux/arch/m68k/mm/ |
H A D | kmap.c | 50 #define IO_SIZE PMD_SIZE 85 virtaddr += PMD_SIZE; in __free_io_area() 86 size -= PMD_SIZE; in __free_io_area() 254 if (!(virtaddr & (PMD_SIZE-1))) in __ioremap() 269 physaddr += PMD_SIZE; in __ioremap() 270 virtaddr += PMD_SIZE; in __ioremap() 271 size -= PMD_SIZE; in __ioremap() 379 virtaddr += PMD_SIZE; in kernel_set_cachemode() 380 size -= PMD_SIZE; in kernel_set_cachemode()
|
/openbmc/linux/arch/x86/mm/ |
H A D | init.c | 351 unsigned long start = round_down(mr[i].start, PMD_SIZE); in adjust_range_page_size_mask() 352 unsigned long end = round_up(mr[i].end, PMD_SIZE); in adjust_range_page_size_mask() 418 end_pfn = PFN_DOWN(PMD_SIZE); in split_mem_range() 420 end_pfn = round_up(pfn, PFN_DOWN(PMD_SIZE)); in split_mem_range() 422 end_pfn = round_up(pfn, PFN_DOWN(PMD_SIZE)); in split_mem_range() 432 start_pfn = round_up(pfn, PFN_DOWN(PMD_SIZE)); in split_mem_range() 434 end_pfn = round_down(limit_pfn, PFN_DOWN(PMD_SIZE)); in split_mem_range() 437 if (end_pfn > round_down(limit_pfn, PFN_DOWN(PMD_SIZE))) in split_mem_range() 438 end_pfn = round_down(limit_pfn, PFN_DOWN(PMD_SIZE)); in split_mem_range() 459 start_pfn = round_up(pfn, PFN_DOWN(PMD_SIZE)); in split_mem_range() [all …]
|
H A D | init_64.c | 378 for (; size; phys += PMD_SIZE, size -= PMD_SIZE) { in __init_extra_mapping() 430 unsigned long end = roundup((unsigned long)_brk_end, PMD_SIZE) - 1; in cleanup_highmap() 441 for (; vaddr + PMD_SIZE - 1 < vaddr_end; pmd++, vaddr += PMD_SIZE) { in cleanup_highmap() 521 paddr_next = (paddr & PMD_MASK) + PMD_SIZE; in phys_pmd_init() 847 ALIGN(unused_pmd_start, PMD_SIZE) - unused_pmd_start); in vmemmap_flush_unused_pmd() 855 unsigned long start = ALIGN_DOWN(addr, PMD_SIZE); in vmemmap_pmd_is_unused() 864 return !memchr_inv((void *)start, PAGE_UNUSED, PMD_SIZE); in vmemmap_pmd_is_unused() 887 if (likely(IS_ALIGNED(end, PMD_SIZE))) in vmemmap_use_sub_pmd() 905 const unsigned long page = ALIGN_DOWN(start, PMD_SIZE); in vmemmap_use_new_sub_pmd() 918 if (!IS_ALIGNED(start, PMD_SIZE)) in vmemmap_use_new_sub_pmd() [all …]
|
H A D | mem_encrypt_identity.c | 96 static char sme_workarea[2 * PMD_SIZE] __section(".init.scratch"); 197 ppd->vaddr += PMD_SIZE; in __sme_map_range_pmd() 198 ppd->paddr += PMD_SIZE; in __sme_map_range_pmd() 224 ppd->vaddr_end = ALIGN(ppd->vaddr, PMD_SIZE); in __sme_map_range() 324 kernel_end = ALIGN((unsigned long)RIP_REL_REF(_end), PMD_SIZE); in sme_encrypt_kernel() 351 execute_end = execute_start + (PAGE_SIZE * 2) + PMD_SIZE; in sme_encrypt_kernel() 374 workarea_end = ALIGN(workarea_start + workarea_len, PMD_SIZE); in sme_encrypt_kernel()
|
H A D | mem_encrypt_amd.c | 171 vaddr += PMD_SIZE; in __sme_early_map_unmap_mem() 172 paddr += PMD_SIZE; in __sme_early_map_unmap_mem() 173 size = (size <= PMD_SIZE) ? 0 : size - PMD_SIZE; in __sme_early_map_unmap_mem()
|
/openbmc/linux/arch/s390/mm/ |
H A D | vmem.c | 94 ALIGN(unused_sub_pmd_start, PMD_SIZE) - unused_sub_pmd_start); in vmemmap_flush_unused_sub_pmd() 117 if (likely(IS_ALIGNED(unused_sub_pmd_start, PMD_SIZE))) in vmemmap_use_sub_pmd() 127 unsigned long page = ALIGN_DOWN(start, PMD_SIZE); in vmemmap_use_new_sub_pmd() 135 if (!IS_ALIGNED(start, PMD_SIZE)) in vmemmap_use_new_sub_pmd() 142 if (!IS_ALIGNED(end, PMD_SIZE)) in vmemmap_use_new_sub_pmd() 149 unsigned long page = ALIGN_DOWN(start, PMD_SIZE); in vmemmap_unuse_sub_pmd() 153 return !memchr_inv((void *)page, PAGE_UNUSED, PMD_SIZE); in vmemmap_unuse_sub_pmd() 233 if (IS_ALIGNED(addr, PMD_SIZE) && in modify_pmd_table() 234 IS_ALIGNED(next, PMD_SIZE)) { in modify_pmd_table() 236 vmem_free_pages(pmd_deref(*pmd), get_order(PMD_SIZE)); in modify_pmd_table() [all …]
|
/openbmc/linux/arch/riscv/mm/ |
H A D | init.c | 214 vmlinux_end = (vmlinux_end + PMD_SIZE - 1) & PMD_MASK; in setup_bootmem() 470 if (sz == PMD_SIZE) { in create_pmd_mapping() 692 !(pa & (PMD_SIZE - 1)) && !(va & (PMD_SIZE - 1)) && size >= PMD_SIZE) in best_map_size() 693 return PMD_SIZE; in best_map_size() 810 PMD_SIZE, PAGE_KERNEL_EXEC); in set_satp_mode() 812 set_satp_mode_pmd + PMD_SIZE, in set_satp_mode() 813 set_satp_mode_pmd + PMD_SIZE, in set_satp_mode() 814 PMD_SIZE, PAGE_KERNEL_EXEC); in set_satp_mode() 909 for (va = kernel_map.virt_addr; va < end_va; va += PMD_SIZE) in create_kernel_page_table() 912 PMD_SIZE, PAGE_KERNEL_EXEC); in create_kernel_page_table() [all …]
|
H A D | hugetlbpage.c | 56 if (sz == PMD_SIZE) { in huge_pte_alloc() 112 if (sz == PMD_SIZE) in huge_pte_offset() 137 case PMD_SIZE: in hugetlb_mask_last_page() 138 return PUD_SIZE - PMD_SIZE; in hugetlb_mask_last_page() 140 return PMD_SIZE - napot_cont_size(NAPOT_CONT64KB_ORDER); in hugetlb_mask_last_page() 238 else if (sz >= PMD_SIZE) in set_huge_pte_at()
|
/openbmc/linux/arch/sh/include/asm/ |
H A D | pgtable-3level.h | 23 #define PMD_SIZE (1UL << PMD_SHIFT) macro 24 #define PMD_MASK (~(PMD_SIZE-1)) 26 #define PTRS_PER_PMD ((1 << PGDIR_SHIFT) / PMD_SIZE)
|
/openbmc/linux/arch/arm64/mm/ |
H A D | hugetlbpage.c | 67 case PMD_SIZE: in __hugetlb_valid_size() 116 *pgsize = PMD_SIZE; in find_num_contig() 135 case PMD_SIZE: in num_contig_ptes() 139 *pgsize = PMD_SIZE; in num_contig_ptes() 300 } else if (sz == PMD_SIZE) { in huge_pte_alloc() 344 if (!(sz == PMD_SIZE || sz == CONT_PMD_SIZE) && in huge_pte_offset() 367 case PMD_SIZE: in hugetlb_mask_last_page() 368 return PUD_SIZE - PMD_SIZE; in hugetlb_mask_last_page() 370 return PMD_SIZE - CONT_PTE_SIZE; in hugetlb_mask_last_page() 387 } else if (pagesize != PUD_SIZE && pagesize != PMD_SIZE) { in arch_make_huge_pte()
|
/openbmc/linux/arch/parisc/kernel/ |
H A D | pci-dma.c | 85 if (end > PMD_SIZE) in map_pte_uncached() 86 end = PMD_SIZE; in map_pte_uncached() 120 vaddr = (vaddr + PMD_SIZE) & PMD_MASK; in map_pmd_uncached() 121 orig_vaddr += PMD_SIZE; in map_pmd_uncached() 170 if (end > PMD_SIZE) in unmap_uncached_pte() 171 end = PMD_SIZE; in unmap_uncached_pte() 210 vaddr = (vaddr + PMD_SIZE) & PMD_MASK; in unmap_uncached_pmd() 211 orig_vaddr += PMD_SIZE; in unmap_uncached_pmd()
|
/openbmc/linux/arch/x86/include/asm/ |
H A D | pgtable_32_types.h | 12 # define PMD_SIZE (1UL << PMD_SHIFT) macro 13 # define PMD_MASK (~(PMD_SIZE - 1))
|
H A D | pgtable_64_types.h | 99 #define PMD_SIZE (_AC(1, UL) << PMD_SHIFT) macro 100 #define PMD_MASK (~(PMD_SIZE - 1))
|
/openbmc/linux/arch/powerpc/mm/book3s64/ |
H A D | radix_pgtable.c | 100 if (map_page_size == PMD_SIZE) { in early_map_kernel_page() 163 if (map_page_size == PMD_SIZE) { in __map_kernel_page() 323 } else if (IS_ALIGNED(addr, PMD_SIZE) && gap >= PMD_SIZE && in create_physical_mapping() 325 mapping_size = PMD_SIZE; in create_physical_mapping() 676 unsigned long start = ALIGN_DOWN(addr, PMD_SIZE); in vmemmap_pmd_is_unused() 678 return !vmemmap_populated(start, PMD_SIZE); in vmemmap_pmd_is_unused() 771 if (IS_ALIGNED(addr, PMD_SIZE) && in remove_pmd_table() 772 IS_ALIGNED(next, PMD_SIZE)) { in remove_pmd_table() 774 free_vmemmap_pages(pmd_page(*pmd), altmap, get_order(PMD_SIZE)); in remove_pmd_table() 780 free_vmemmap_pages(pmd_page(*pmd), altmap, get_order(PMD_SIZE)); in remove_pmd_table() [all …]
|
/openbmc/linux/arch/nios2/mm/ |
H A D | ioremap.c | 33 if (end > PMD_SIZE) in remap_area_pte() 34 end = PMD_SIZE; in remap_area_pte() 70 address = (address + PMD_SIZE) & PMD_MASK; in remap_area_pmd()
|
/openbmc/linux/arch/loongarch/include/asm/ |
H A D | pgtable.h | 29 #define PMD_SIZE (1UL << PMD_SHIFT) macro 30 #define PMD_MASK (~(PMD_SIZE-1)) 34 #define PMD_SIZE (1UL << PMD_SHIFT) macro 35 #define PMD_MASK (~(PMD_SIZE-1)) 96 …R_PUD * PTRS_PER_PMD * PTRS_PER_PTE * PAGE_SIZE, (1UL << cpu_vabits)) - PMD_SIZE - VMEMMAP_SIZE - … 100 …D * PTRS_PER_PMD * PTRS_PER_PTE * PAGE_SIZE, (1UL << cpu_vabits) / 2) - PMD_SIZE - VMEMMAP_SIZE - … 103 #define vmemmap ((struct page *)((VMALLOC_END + PMD_SIZE) & PMD_MASK))
|
/openbmc/linux/include/asm-generic/ |
H A D | pgtable-nopmd.h | 22 #define PMD_SIZE (1UL << PMD_SHIFT) macro 23 #define PMD_MASK (~(PMD_SIZE-1))
|
/openbmc/linux/arch/arm64/kvm/ |
H A D | pkvm.c | 88 hyp_mem_base = memblock_phys_alloc(ALIGN(hyp_mem_size, PMD_SIZE), in kvm_hyp_reserve() 89 PMD_SIZE); in kvm_hyp_reserve() 93 hyp_mem_size = ALIGN(hyp_mem_size, PMD_SIZE); in kvm_hyp_reserve()
|
/openbmc/linux/arch/powerpc/include/asm/nohash/64/ |
H A D | pgtable-4k.h | 31 #define PMD_SIZE (1UL << PMD_SHIFT) macro 32 #define PMD_MASK (~(PMD_SIZE-1))
|
/openbmc/linux/arch/x86/kernel/ |
H A D | vmlinux.lds.S | 69 #define ALIGN_ENTRY_TEXT_BEGIN . = ALIGN(PMD_SIZE); 70 #define ALIGN_ENTRY_TEXT_END . = ALIGN(PMD_SIZE); 81 . = ALIGN(PMD_SIZE); \ 86 . = ALIGN(PMD_SIZE); \
|
/openbmc/linux/arch/um/include/asm/ |
H A D | pgtable-3level.h | 27 #define PMD_SIZE (1UL << PMD_SHIFT) macro 28 #define PMD_MASK (~(PMD_SIZE-1))
|
/openbmc/linux/arch/m68k/include/asm/ |
H A D | pgtable_mm.h | 39 #define PMD_SIZE (1UL << PMD_SHIFT) macro 40 #define PMD_MASK (~(PMD_SIZE-1))
|
/openbmc/linux/arch/arm/mm/ |
H A D | mmu.c | 1125 next = (addr + PMD_SIZE - 1) & PMD_MASK; in fill_pmd_gaps() 1217 if (!IS_ALIGNED(block_start, PMD_SIZE)) { in adjust_lowmem_bounds() 1220 len = round_up(block_start, PMD_SIZE) - block_start; in adjust_lowmem_bounds() 1253 if (!IS_ALIGNED(block_start, PMD_SIZE)) in adjust_lowmem_bounds() 1255 else if (!IS_ALIGNED(block_end, PMD_SIZE)) in adjust_lowmem_bounds() 1274 memblock_limit = round_down(memblock_limit, PMD_SIZE); in adjust_lowmem_bounds() 1304 for (addr = 0; addr < KASAN_SHADOW_START; addr += PMD_SIZE) in prepare_page_table() 1312 for (addr = KASAN_SHADOW_END; addr < MODULES_VADDR; addr += PMD_SIZE) in prepare_page_table() 1315 for (addr = 0; addr < MODULES_VADDR; addr += PMD_SIZE) in prepare_page_table() 1321 addr = ((unsigned long)_exiprom + PMD_SIZE - 1) & PMD_MASK; in prepare_page_table() [all …]
|
/openbmc/linux/arch/arm/include/asm/ |
H A D | pgtable-2level.h | 87 #define PMD_SIZE (1UL << PMD_SHIFT) macro 88 #define PMD_MASK (~(PMD_SIZE-1))
|
/openbmc/linux/arch/x86/boot/compressed/ |
H A D | ident_map_64.c | 98 start = round_down(start, PMD_SIZE); in kernel_add_identity_map() 99 end = round_up(end, PMD_SIZE); in kernel_add_identity_map() 369 end = address + PMD_SIZE; in do_boot_page_fault()
|