/arch/arc/include/asm/ |
D | hugepage.h | 14 static inline pte_t pmd_pte(pmd_t pmd) in pmd_pte() argument 16 return __pte(pmd_val(pmd)); in pmd_pte() 24 #define pmd_wrprotect(pmd) pte_pmd(pte_wrprotect(pmd_pte(pmd))) argument 25 #define pmd_mkwrite(pmd) pte_pmd(pte_mkwrite(pmd_pte(pmd))) argument 26 #define pmd_mkdirty(pmd) pte_pmd(pte_mkdirty(pmd_pte(pmd))) argument 27 #define pmd_mkold(pmd) pte_pmd(pte_mkold(pmd_pte(pmd))) argument 28 #define pmd_mkyoung(pmd) pte_pmd(pte_mkyoung(pmd_pte(pmd))) argument 29 #define pmd_mkhuge(pmd) pte_pmd(pte_mkhuge(pmd_pte(pmd))) argument 30 #define pmd_mknotpresent(pmd) pte_pmd(pte_mknotpresent(pmd_pte(pmd))) argument 31 #define pmd_mkclean(pmd) pte_pmd(pte_mkclean(pmd_pte(pmd))) argument [all …]
|
/arch/arm/include/asm/ |
D | pgtable-3level.h | 134 #define pmd_table(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \ argument 136 #define pmd_sect(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \ argument 138 #define pmd_large(pmd) pmd_sect(pmd) argument 164 #define pmd_bad(pmd) (!(pmd_val(pmd) & 2)) argument 200 #define pmd_isset(pmd, val) ((u32)(val) == (val) ? pmd_val(pmd) & (val) \ argument 201 : !!(pmd_val(pmd) & (val))) 202 #define pmd_isclear(pmd, val) (!(pmd_val(pmd) & (val))) argument 204 #define pmd_present(pmd) (pmd_isset((pmd), L_PMD_SECT_VALID)) argument 205 #define pmd_young(pmd) (pmd_isset((pmd), PMD_SECT_AF)) argument 213 #define pmd_write(pmd) (pmd_isclear((pmd), L_PMD_SECT_RDONLY)) argument [all …]
|
/arch/parisc/include/asm/ |
D | pgalloc.h | 62 static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmd) in pgd_populate() argument 65 (__u32)(__pa((unsigned long)pmd) >> PxD_VALUE_SHIFT)); in pgd_populate() 70 pmd_t *pmd = (pmd_t *)__get_free_pages(GFP_KERNEL, PMD_ORDER); in pmd_alloc_one() local 71 if (pmd) in pmd_alloc_one() 72 memset(pmd, 0, PAGE_SIZE<<PMD_ORDER); in pmd_alloc_one() 73 return pmd; in pmd_alloc_one() 76 static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) in pmd_free() argument 78 if (pmd_flag(*pmd) & PxD_FLAG_ATTACHED) { in pmd_free() 88 free_pages((unsigned long)pmd, PMD_ORDER); in pmd_free() 102 #define pgd_populate(mm, pmd, pte) BUG() argument [all …]
|
/arch/mips/include/asm/ |
D | pgalloc.h | 18 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, in pmd_populate_kernel() argument 21 set_pmd(pmd, __pmd((unsigned long)pte)); in pmd_populate_kernel() 24 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, in pmd_populate() argument 27 set_pmd(pmd, __pmd((unsigned long)page_address(pte))); in pmd_populate() 29 #define pmd_pgtable(pmd) pmd_page(pmd) argument 38 static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) in pud_populate() argument 40 set_pud(pud, __pud((unsigned long)pmd)); in pud_populate() 65 pmd_t *pmd; in pmd_alloc_one() local 67 pmd = (pmd_t *) __get_free_pages(GFP_KERNEL, PMD_ORDER); in pmd_alloc_one() 68 if (pmd) in pmd_alloc_one() [all …]
|
D | pgtable.h | 94 #define pmd_phys(pmd) virt_to_phys((void *)pmd_val(pmd)) argument 96 #define __pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT)) argument 98 #define pmd_page(pmd) __pmd_page(pmd) argument 101 #define pmd_page_vaddr(pmd) pmd_val(pmd) argument 517 static inline int pmd_trans_huge(pmd_t pmd) argument 519 return !!(pmd_val(pmd) & _PAGE_HUGE); 522 static inline pmd_t pmd_mkhuge(pmd_t pmd) argument 524 pmd_val(pmd) |= _PAGE_HUGE; 526 return pmd; 530 pmd_t *pmdp, pmd_t pmd); [all …]
|
/arch/alpha/include/asm/ |
D | pgalloc.h | 17 pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t pte) in pmd_populate() argument 19 pmd_set(pmd, (pte_t *)(page_to_pa(pte) + PAGE_OFFSET)); in pmd_populate() 21 #define pmd_pgtable(pmd) pmd_page(pmd) argument 24 pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) in pmd_populate_kernel() argument 26 pmd_set(pmd, pte); in pmd_populate_kernel() 30 pgd_populate(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmd) in pgd_populate() argument 32 pgd_set(pgd, pmd); in pgd_populate() 51 pmd_free(struct mm_struct *mm, pmd_t *pmd) in pmd_free() argument 53 free_page((unsigned long)pmd); in pmd_free()
|
/arch/nds32/mm/ |
D | mm-nds32.c | 43 pmd_t *pmd; in pgd_free() local 49 pmd = (pmd_t *) pgd; in pgd_free() 50 if (pmd_none(*pmd)) in pgd_free() 52 if (pmd_bad(*pmd)) { in pgd_free() 53 pmd_ERROR(*pmd); in pgd_free() 54 pmd_clear(pmd); in pgd_free() 58 pte = pmd_page(*pmd); in pgd_free() 59 pmd_clear(pmd); in pgd_free() 63 pmd_free(mm, pmd); in pgd_free() 77 pmd_t *pmd; in setup_mm_for_reboot() local [all …]
|
/arch/riscv/include/asm/ |
D | pgalloc.h | 16 pmd_t *pmd, pte_t *pte) in pmd_populate_kernel() argument 20 set_pmd(pmd, __pmd((pfn << _PAGE_PFN_SHIFT) | _PAGE_TABLE)); in pmd_populate_kernel() 24 pmd_t *pmd, pgtable_t pte) in pmd_populate() argument 28 set_pmd(pmd, __pmd((pfn << _PAGE_PFN_SHIFT) | _PAGE_TABLE)); in pmd_populate() 32 static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) in pud_populate() argument 34 unsigned long pfn = virt_to_pfn(pmd); in pud_populate() 40 #define pmd_pgtable(pmd) pmd_page(pmd) argument 70 static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) in pmd_free() argument 72 free_page((unsigned long)pmd); in pmd_free() 75 #define __pmd_free_tlb(tlb, pmd, addr) pmd_free((tlb)->mm, pmd) argument
|
/arch/arm/mm/ |
D | idmap.c | 27 pmd_t *pmd; in idmap_add_pmd() local 31 pmd = pmd_alloc_one(&init_mm, addr); in idmap_add_pmd() 32 if (!pmd) { in idmap_add_pmd() 41 memcpy(pmd, pmd_offset(pud, 0), in idmap_add_pmd() 43 pud_populate(&init_mm, pud, pmd); in idmap_add_pmd() 44 pmd += pmd_index(addr); in idmap_add_pmd() 46 pmd = pmd_offset(pud, addr); in idmap_add_pmd() 50 *pmd = __pmd((addr & PMD_MASK) | prot); in idmap_add_pmd() 51 flush_pmd_entry(pmd); in idmap_add_pmd() 52 } while (pmd++, addr = next, addr != end); in idmap_add_pmd() [all …]
|
/arch/x86/power/ |
D | hibernate_32.c | 59 static pte_t *resume_one_page_table_init(pmd_t *pmd) in resume_one_page_table_init() argument 61 if (pmd_none(*pmd)) { in resume_one_page_table_init() 66 set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE)); in resume_one_page_table_init() 68 BUG_ON(page_table != pte_offset_kernel(pmd, 0)); in resume_one_page_table_init() 73 return pte_offset_kernel(pmd, 0); in resume_one_page_table_init() 85 pmd_t *pmd; in resume_physical_mapping_init() local 94 pmd = resume_one_md_table_init(pgd); in resume_physical_mapping_init() 95 if (!pmd) in resume_physical_mapping_init() 101 for (pmd_idx = 0; pmd_idx < PTRS_PER_PMD; pmd++, pmd_idx++) { in resume_physical_mapping_init() 110 set_pmd(pmd, pfn_pmd(pfn, PAGE_KERNEL_LARGE_EXEC)); in resume_physical_mapping_init() [all …]
|
/arch/powerpc/include/asm/nohash/64/ |
D | pgalloc.h | 31 static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) in pud_populate() argument 33 pud_set(pud, (unsigned long)pmd); in pud_populate() 36 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, in pmd_populate_kernel() argument 39 pmd_set(pmd, (unsigned long)pte); in pmd_populate_kernel() 42 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, in pmd_populate() argument 45 pmd_set(pmd, (unsigned long)pte_page); in pmd_populate() 54 static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) in pmd_free() argument 56 kmem_cache_free(PGT_CACHE(PMD_CACHE_INDEX), pmd); in pmd_free() 59 #define __pmd_free_tlb(tlb, pmd, addr) \ argument 60 pgtable_free_tlb(tlb, pmd, PMD_CACHE_INDEX)
|
/arch/sh/mm/ |
D | hugetlbpage.c | 30 pmd_t *pmd; in huge_pte_alloc() local 37 pmd = pmd_alloc(mm, pud, addr); in huge_pte_alloc() 38 if (pmd) in huge_pte_alloc() 39 pte = pte_alloc_map(mm, pmd, addr); in huge_pte_alloc() 51 pmd_t *pmd; in huge_pte_offset() local 58 pmd = pmd_offset(pud, addr); in huge_pte_offset() 59 if (pmd) in huge_pte_offset() 60 pte = pte_offset_map(pmd, addr); in huge_pte_offset() 67 int pmd_huge(pmd_t pmd) in pmd_huge() argument
|
/arch/arm64/include/asm/ |
D | pgtable.h | 128 #define pmd_access_permitted(pmd, write) \ argument 129 (pte_access_permitted(pmd_pte(pmd), (write))) 215 static inline pmd_t pmd_mkcont(pmd_t pmd) in pmd_mkcont() argument 217 return __pmd(pmd_val(pmd) | PMD_SECT_CONT); in pmd_mkcont() 330 static inline pte_t pmd_pte(pmd_t pmd) in pmd_pte() argument 332 return __pte(pmd_val(pmd)); in pmd_pte() 359 static inline int pmd_protnone(pmd_t pmd) in pmd_protnone() argument 361 return pte_protnone(pmd_pte(pmd)); in pmd_protnone() 370 #define pmd_trans_huge(pmd) (pmd_val(pmd) && !(pmd_val(pmd) & PMD_TABLE_BIT)) argument 373 #define pmd_present(pmd) pte_present(pmd_pte(pmd)) argument [all …]
|
/arch/um/include/asm/ |
D | pgalloc.h | 15 #define pmd_populate_kernel(mm, pmd, pte) \ argument 16 set_pmd(pmd, __pmd(_PAGE_TABLE + (unsigned long) __pa(pte))) 18 #define pmd_populate(mm, pmd, pte) \ argument 19 set_pmd(pmd, __pmd(_PAGE_TABLE + \ 22 #define pmd_pgtable(pmd) pmd_page(pmd) argument 38 static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) in pmd_free() argument 40 free_page((unsigned long)pmd); in pmd_free()
|
/arch/x86/include/asm/ |
D | pgalloc.h | 64 pmd_t *pmd, pte_t *pte) in pmd_populate_kernel() argument 67 set_pmd(pmd, __pmd(__pa(pte) | _PAGE_TABLE)); in pmd_populate_kernel() 71 pmd_t *pmd, pte_t *pte) in pmd_populate_kernel_safe() argument 74 set_pmd_safe(pmd, __pmd(__pa(pte) | _PAGE_TABLE)); in pmd_populate_kernel_safe() 77 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, in pmd_populate() argument 83 set_pmd(pmd, __pmd(((pteval_t)pfn << PAGE_SHIFT) | _PAGE_TABLE)); in pmd_populate() 86 #define pmd_pgtable(pmd) pmd_page(pmd) argument 106 static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) in pmd_free() argument 108 BUG_ON((unsigned long)pmd & (PAGE_SIZE-1)); in pmd_free() 109 pgtable_pmd_page_dtor(virt_to_page(pmd)); in pmd_free() [all …]
|
D | pgtable.h | 30 int __init __early_make_pgtable(unsigned long address, pmdval_t pmd); 69 #define set_pmd(pmdp, pmd) native_set_pmd(pmdp, pmd) argument 93 #define pmd_clear(pmd) native_pmd_clear(pmd) argument 162 static inline int pmd_dirty(pmd_t pmd) in pmd_dirty() argument 164 return pmd_flags(pmd) & _PAGE_DIRTY; in pmd_dirty() 167 static inline int pmd_young(pmd_t pmd) in pmd_young() argument 169 return pmd_flags(pmd) & _PAGE_ACCESSED; in pmd_young() 218 static inline unsigned long pmd_pfn(pmd_t pmd) in pmd_pfn() argument 220 phys_addr_t pfn = pmd_val(pmd); in pmd_pfn() 222 return (pfn & pmd_pfn_mask(pmd)) >> PAGE_SHIFT; in pmd_pfn() [all …]
|
/arch/m68k/include/asm/ |
D | motorola_pgalloc.h | 75 static inline int pmd_free(struct mm_struct *mm, pmd_t *pmd) in pmd_free() argument 77 return free_pointer_table(pmd); in pmd_free() 80 static inline int __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd, in __pmd_free_tlb() argument 83 return free_pointer_table(pmd); in __pmd_free_tlb() 98 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) in pmd_populate_kernel() argument 100 pmd_set(pmd, pte); in pmd_populate_kernel() 103 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t page) in pmd_populate() argument 105 pmd_set(pmd, page_address(page)); in pmd_populate() 107 #define pmd_pgtable(pmd) pmd_page(pmd) argument 109 static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmd) in pgd_populate() argument [all …]
|
/arch/s390/include/asm/ |
D | pgtable.h | 695 static inline int pmd_large(pmd_t pmd) in pmd_large() argument 697 return (pmd_val(pmd) & _SEGMENT_ENTRY_LARGE) != 0; in pmd_large() 700 static inline int pmd_bad(pmd_t pmd) in pmd_bad() argument 702 if ((pmd_val(pmd) & _SEGMENT_ENTRY_TYPE_MASK) > 0) in pmd_bad() 704 if (pmd_large(pmd)) in pmd_bad() 705 return (pmd_val(pmd) & ~_SEGMENT_ENTRY_BITS_LARGE) != 0; in pmd_bad() 706 return (pmd_val(pmd) & ~_SEGMENT_ENTRY_BITS) != 0; in pmd_bad() 733 static inline int pmd_present(pmd_t pmd) in pmd_present() argument 735 return pmd_val(pmd) != _SEGMENT_ENTRY_EMPTY; in pmd_present() 738 static inline int pmd_none(pmd_t pmd) in pmd_none() argument [all …]
|
/arch/powerpc/include/asm/book3s/64/ |
D | pgtable.h | 744 #define __pmd_to_swp_entry(pmd) (__pte_to_swp_entry(pmd_pte(pmd))) argument 868 static inline int pmd_none(pmd_t pmd) in pmd_none() argument 870 return !pmd_raw(pmd); in pmd_none() 873 static inline int pmd_present(pmd_t pmd) in pmd_present() argument 881 if (pmd_raw(pmd) & cpu_to_be64(_PAGE_PRESENT | _PAGE_INVALID)) in pmd_present() 887 static inline int pmd_is_serializing(pmd_t pmd) in pmd_is_serializing() argument 897 if ((pmd_raw(pmd) & cpu_to_be64(_PAGE_PRESENT | _PAGE_INVALID)) == in pmd_is_serializing() 904 static inline int pmd_bad(pmd_t pmd) in pmd_bad() argument 907 return radix__pmd_bad(pmd); in pmd_bad() 908 return hash__pmd_bad(pmd); in pmd_bad() [all …]
|
/arch/sh/include/asm/ |
D | pgalloc.h | 12 extern void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd); 14 extern void pmd_free(struct mm_struct *mm, pmd_t *pmd); 18 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, in pmd_populate_kernel() argument 21 set_pmd(pmd, __pmd((unsigned long)pte)); in pmd_populate_kernel() 24 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, in pmd_populate() argument 27 set_pmd(pmd, __pmd((unsigned long)page_address(pte))); in pmd_populate() 29 #define pmd_pgtable(pmd) pmd_page(pmd) argument
|
/arch/x86/mm/ |
D | pgtable.c | 54 void ___pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) in ___pmd_free_tlb() argument 56 struct page *page = virt_to_page(pmd); in ___pmd_free_tlb() 57 paravirt_release_pmd(__pa(pmd) >> PAGE_SHIFT); in ___pmd_free_tlb() 181 void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd) in pud_populate() argument 183 paravirt_alloc_pmd(mm, __pa(pmd) >> PAGE_SHIFT); in pud_populate() 187 set_pud(pudp, __pud(__pa(pmd) | _PAGE_PRESENT)); in pud_populate() 228 pmd_t *pmd = (pmd_t *)__get_free_page(gfp); in preallocate_pmds() local 229 if (!pmd) in preallocate_pmds() 231 if (pmd && !pgtable_pmd_page_ctor(virt_to_page(pmd))) { in preallocate_pmds() 232 free_page((unsigned long)pmd); in preallocate_pmds() [all …]
|
/arch/unicore32/kernel/ |
D | hibernate.c | 48 static pte_t *resume_one_page_table_init(pmd_t *pmd) in resume_one_page_table_init() argument 50 if (pmd_none(*pmd)) { in resume_one_page_table_init() 55 set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_KERNEL_TABLE)); in resume_one_page_table_init() 57 BUG_ON(page_table != pte_offset_kernel(pmd, 0)); in resume_one_page_table_init() 62 return pte_offset_kernel(pmd, 0); in resume_one_page_table_init() 74 pmd_t *pmd; in resume_physical_mapping_init() local 83 pmd = resume_one_md_table_init(pgd); in resume_physical_mapping_init() 84 if (!pmd) in resume_physical_mapping_init() 90 for (pmd_idx = 0; pmd_idx < PTRS_PER_PMD; pmd++, pmd_idx++) { in resume_physical_mapping_init() 99 pte = resume_one_page_table_init(pmd); in resume_physical_mapping_init()
|
/arch/microblaze/include/asm/ |
D | pgalloc.h | 27 extern void __bad_pte(pmd_t *pmd); 42 #define pmd_pgtable(pmd) pmd_page(pmd) argument 55 #define pmd_populate(mm, pmd, pte) \ argument 56 (pmd_val(*(pmd)) = (unsigned long)page_address(pte)) 58 #define pmd_populate_kernel(mm, pmd, pte) \ argument 59 (pmd_val(*(pmd)) = (unsigned long) (pte)) 68 #define pgd_populate(mm, pmd, pte) BUG() argument
|
/arch/unicore32/mm/ |
D | pgd.c | 78 pmd_t *pmd; in free_pgd_slow() local 85 pmd = pmd_off(pgd, 0); in free_pgd_slow() 86 if (pmd_none(*pmd)) in free_pgd_slow() 88 if (pmd_bad(*pmd)) { in free_pgd_slow() 89 pmd_ERROR(*pmd); in free_pgd_slow() 90 pmd_clear(pmd); in free_pgd_slow() 94 pte = pmd_pgtable(*pmd); in free_pgd_slow() 95 pmd_clear(pmd); in free_pgd_slow() 98 pmd_free(mm, pmd); in free_pgd_slow()
|
/arch/um/kernel/ |
D | mem.c | 65 static void __init one_page_table_init(pmd_t *pmd) in one_page_table_init() argument 67 if (pmd_none(*pmd)) { in one_page_table_init() 74 set_pmd(pmd, __pmd(_KERNPG_TABLE + in one_page_table_init() 76 if (pte != pte_offset_kernel(pmd, 0)) in one_page_table_init() 100 pmd_t *pmd; in fixrange_init() local 113 pmd = pmd_offset(pud, vaddr); in fixrange_init() 114 for (; (j < PTRS_PER_PMD) && (vaddr < end); pmd++, j++) { in fixrange_init() 115 one_page_table_init(pmd); in fixrange_init() 128 pmd_t *pmd; in fixaddr_user_init() local 148 pmd = pmd_offset(pud, vaddr); in fixaddr_user_init() [all …]
|