/arch/arc/include/asm/ |
D | hugepage.h | 13 static inline pte_t pmd_pte(pmd_t pmd) in pmd_pte() argument 15 return __pte(pmd_val(pmd)); in pmd_pte() 23 #define pmd_wrprotect(pmd) pte_pmd(pte_wrprotect(pmd_pte(pmd))) argument 24 #define pmd_mkwrite(pmd) pte_pmd(pte_mkwrite(pmd_pte(pmd))) argument 25 #define pmd_mkdirty(pmd) pte_pmd(pte_mkdirty(pmd_pte(pmd))) argument 26 #define pmd_mkold(pmd) pte_pmd(pte_mkold(pmd_pte(pmd))) argument 27 #define pmd_mkyoung(pmd) pte_pmd(pte_mkyoung(pmd_pte(pmd))) argument 28 #define pmd_mkhuge(pmd) pte_pmd(pte_mkhuge(pmd_pte(pmd))) argument 29 #define pmd_mkinvalid(pmd) pte_pmd(pte_mknotpresent(pmd_pte(pmd))) argument 30 #define pmd_mkclean(pmd) pte_pmd(pte_mkclean(pmd_pte(pmd))) argument [all …]
|
/arch/arm/include/asm/ |
D | pgtable-3level.h | 114 #define pmd_table(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \ argument 116 #define pmd_sect(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \ argument 118 #define pmd_large(pmd) pmd_sect(pmd) argument 119 #define pmd_leaf(pmd) pmd_sect(pmd) argument 138 #define pmd_bad(pmd) (!(pmd_val(pmd) & 2)) argument 174 #define pmd_isset(pmd, val) ((u32)(val) == (val) ? pmd_val(pmd) & (val) \ argument 175 : !!(pmd_val(pmd) & (val))) 176 #define pmd_isclear(pmd, val) (!(pmd_val(pmd) & (val))) argument 178 #define pmd_present(pmd) (pmd_isset((pmd), L_PMD_SECT_VALID)) argument 179 #define pmd_young(pmd) (pmd_isset((pmd), PMD_SECT_AF)) argument [all …]
|
/arch/parisc/include/asm/ |
D | pgalloc.h | 41 static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) in pud_populate() argument 44 (__u32)(__pa((unsigned long)pmd) >> PxD_VALUE_SHIFT))); in pud_populate() 49 pmd_t *pmd; in pmd_alloc_one() local 51 pmd = (pmd_t *)__get_free_pages(GFP_PGTABLE_KERNEL, PMD_ORDER); in pmd_alloc_one() 52 if (likely(pmd)) in pmd_alloc_one() 53 memset ((void *)pmd, 0, PAGE_SIZE << PMD_ORDER); in pmd_alloc_one() 54 return pmd; in pmd_alloc_one() 57 static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) in pmd_free() argument 59 free_pages((unsigned long)pmd, PMD_ORDER); in pmd_free() 64 pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) in pmd_populate_kernel() argument [all …]
|
/arch/mips/include/asm/ |
D | pgtable.h | 92 #define pmd_phys(pmd) virt_to_phys((void *)pmd_val(pmd)) argument 94 #define __pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT)) argument 96 #define pmd_page(pmd) __pmd_page(pmd) argument 99 #define pmd_page_vaddr(pmd) pmd_val(pmd) argument 585 static inline int pmd_trans_huge(pmd_t pmd) argument 587 return !!(pmd_val(pmd) & _PAGE_HUGE); 590 static inline pmd_t pmd_mkhuge(pmd_t pmd) argument 592 pmd_val(pmd) |= _PAGE_HUGE; 594 return pmd; 598 pmd_t *pmdp, pmd_t pmd); [all …]
|
D | pgalloc.h | 21 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, in pmd_populate_kernel() argument 24 set_pmd(pmd, __pmd((unsigned long)pte)); in pmd_populate_kernel() 27 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, in pmd_populate() argument 30 set_pmd(pmd, __pmd((unsigned long)page_address(pte))); in pmd_populate() 32 #define pmd_pgtable(pmd) pmd_page(pmd) argument 41 static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) in pud_populate() argument 43 set_pud(pud, __pud((unsigned long)pmd)); in pud_populate() 68 pmd_t *pmd; in pmd_alloc_one() local 80 pmd = (pmd_t *)page_address(pg); in pmd_alloc_one() 81 pmd_init((unsigned long)pmd, (unsigned long)invalid_pte_table); in pmd_alloc_one() [all …]
|
/arch/arm64/include/asm/ |
D | pgtable.h | 145 #define pmd_access_permitted(pmd, write) \ argument 146 (pte_access_permitted(pmd_pte(pmd), (write))) 162 static inline pmd_t clear_pmd_bit(pmd_t pmd, pgprot_t prot) in clear_pmd_bit() argument 164 pmd_val(pmd) &= ~pgprot_val(prot); in clear_pmd_bit() 165 return pmd; in clear_pmd_bit() 168 static inline pmd_t set_pmd_bit(pmd_t pmd, pgprot_t prot) in set_pmd_bit() argument 170 pmd_val(pmd) |= pgprot_val(prot); in set_pmd_bit() 171 return pmd; in set_pmd_bit() 244 static inline pmd_t pmd_mkcont(pmd_t pmd) in pmd_mkcont() argument 246 return __pmd(pmd_val(pmd) | PMD_SECT_CONT); in pmd_mkcont() [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 37 #define __pmd_free_tlb(tlb, pmd, address) \ argument 39 pgtable_pmd_page_dtor(virt_to_page(pmd)); \ 40 tlb_remove_page((tlb),virt_to_page(pmd)); \
|
/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 pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) in pud_populate() argument 32 pud_set(pud, pmd); in pud_populate()
|
/arch/m68k/include/asm/ |
D | motorola_pgalloc.h | 59 static inline int pmd_free(struct mm_struct *mm, pmd_t *pmd) in pmd_free() argument 61 return free_pointer_table(pmd, TABLE_PMD); in pmd_free() 64 static inline int __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd, in __pmd_free_tlb() argument 67 return free_pointer_table(pmd, TABLE_PMD); in __pmd_free_tlb() 82 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) in pmd_populate_kernel() argument 84 pmd_set(pmd, pte); in pmd_populate_kernel() 87 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t page) in pmd_populate() argument 89 pmd_set(pmd, page); in pmd_populate() 91 #define pmd_pgtable(pmd) ((pgtable_t)pmd_page_vaddr(pmd)) argument 93 static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) in pud_populate() argument [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/nds32/mm/ |
D | mm-nds32.c | 45 pmd_t *pmd; in pgd_free() local 51 pmd = (pmd_t *) pgd; in pgd_free() 52 if (pmd_none(*pmd)) in pgd_free() 54 if (pmd_bad(*pmd)) { in pgd_free() 55 pmd_ERROR(*pmd); in pgd_free() 56 pmd_clear(pmd); in pgd_free() 60 pte = pmd_page(*pmd); in pgd_free() 61 pmd_clear(pmd); in pgd_free() 65 pmd_free(mm, pmd); in pgd_free() 81 pmd_t *pmd; in setup_mm_for_reboot() local [all …]
|
/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/riscv/include/asm/ |
D | pgalloc.h | 17 pmd_t *pmd, pte_t *pte) in pmd_populate_kernel() argument 21 set_pmd(pmd, __pmd((pfn << _PAGE_PFN_SHIFT) | _PAGE_TABLE)); in pmd_populate_kernel() 25 pmd_t *pmd, pgtable_t pte) in pmd_populate() argument 29 set_pmd(pmd, __pmd((pfn << _PAGE_PFN_SHIFT) | _PAGE_TABLE)); in pmd_populate() 33 static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) in pud_populate() argument 35 unsigned long pfn = virt_to_pfn(pmd); in pud_populate() 41 #define pmd_pgtable(pmd) pmd_page(pmd) argument 60 #define __pmd_free_tlb(tlb, pmd, addr) pmd_free((tlb)->mm, pmd) argument
|
/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/x86/include/asm/ |
D | pgtable.h | 31 bool __init __early_make_pgtable(unsigned long address, pmdval_t pmd); 70 #define set_pmd(pmdp, pmd) native_set_pmd(pmdp, pmd) argument 94 #define pmd_clear(pmd) native_pmd_clear(pmd) argument 163 static inline int pmd_dirty(pmd_t pmd) in pmd_dirty() argument 165 return pmd_flags(pmd) & _PAGE_DIRTY; in pmd_dirty() 168 static inline int pmd_young(pmd_t pmd) in pmd_young() argument 170 return pmd_flags(pmd) & _PAGE_ACCESSED; in pmd_young() 219 static inline unsigned long pmd_pfn(pmd_t pmd) in pmd_pfn() argument 221 phys_addr_t pfn = pmd_val(pmd); in pmd_pfn() 223 return (pfn & pmd_pfn_mask(pmd)) >> PAGE_SHIFT; in pmd_pfn() [all …]
|
D | pgalloc.h | 65 pmd_t *pmd, pte_t *pte) in pmd_populate_kernel() argument 68 set_pmd(pmd, __pmd(__pa(pte) | _PAGE_TABLE)); in pmd_populate_kernel() 72 pmd_t *pmd, pte_t *pte) in pmd_populate_kernel_safe() argument 75 set_pmd_safe(pmd, __pmd(__pa(pte) | _PAGE_TABLE)); in pmd_populate_kernel_safe() 78 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, in pmd_populate() argument 84 set_pmd(pmd, __pmd(((pteval_t)pfn << PAGE_SHIFT) | _PAGE_TABLE)); in pmd_populate() 87 #define pmd_pgtable(pmd) pmd_page(pmd) argument 90 extern void ___pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd); 92 static inline void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd, in __pmd_free_tlb() argument 95 ___pmd_free_tlb(tlb, pmd); in __pmd_free_tlb() [all …]
|
D | pgtable-3level.h | 98 static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd) in native_set_pmd() argument 100 set_64bit((unsigned long long *)(pmdp), native_pmd_val(pmd)); in native_set_pmd() 124 static inline void native_pmd_clear(pmd_t *pmd) in native_pmd_clear() argument 126 u32 *tmp = (u32 *)pmd; in native_pmd_clear() 170 pmd_t pmd; member 183 return res.pmd; in native_pmdp_get_and_clear() 192 unsigned long address, pmd_t *pmdp, pmd_t pmd) in pmdp_establish() 201 if (!(pmd_val(pmd) & _PAGE_PRESENT)) { in pmdp_establish() 206 new.pmd = pmd; in pmdp_establish() 212 return old.pmd; in pmdp_establish() [all …]
|
/arch/powerpc/include/asm/book3s/64/ |
D | pgtable.h | 752 #define __pmd_to_swp_entry(pmd) (__pte_to_swp_entry(pmd_pte(pmd))) argument 891 static inline int pmd_none(pmd_t pmd) in pmd_none() argument 893 return !pmd_raw(pmd); in pmd_none() 896 static inline int pmd_present(pmd_t pmd) in pmd_present() argument 904 if (pmd_raw(pmd) & cpu_to_be64(_PAGE_PRESENT | _PAGE_INVALID)) in pmd_present() 910 static inline int pmd_is_serializing(pmd_t pmd) in pmd_is_serializing() argument 920 if ((pmd_raw(pmd) & cpu_to_be64(_PAGE_PRESENT | _PAGE_INVALID)) == in pmd_is_serializing() 927 static inline int pmd_bad(pmd_t pmd) in pmd_bad() argument 930 return radix__pmd_bad(pmd); in pmd_bad() 931 return hash__pmd_bad(pmd); in pmd_bad() [all …]
|
/arch/microblaze/include/asm/ |
D | pgalloc.h | 24 extern void __bad_pte(pmd_t *pmd); 33 #define pmd_pgtable(pmd) pmd_page(pmd) argument 39 #define pmd_populate(mm, pmd, pte) \ argument 40 (pmd_val(*(pmd)) = (unsigned long)page_address(pte)) 42 #define pmd_populate_kernel(mm, pmd, pte) \ argument 43 (pmd_val(*(pmd)) = (unsigned long) (pte))
|
/arch/sh/mm/ |
D | hugetlbpage.c | 30 pmd_t *pmd; in huge_pte_alloc() local 39 pmd = pmd_alloc(mm, pud, addr); in huge_pte_alloc() 40 if (pmd) in huge_pte_alloc() 41 pte = pte_alloc_map(mm, pmd, addr); in huge_pte_alloc() 55 pmd_t *pmd; in huge_pte_offset() local 64 pmd = pmd_offset(pud, addr); in huge_pte_offset() 65 if (pmd) in huge_pte_offset() 66 pte = pte_offset_map(pmd, addr); in huge_pte_offset() 74 int pmd_huge(pmd_t pmd) in pmd_huge() argument
|
/arch/sh/include/asm/ |
D | pgalloc.h | 16 extern void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd); 18 extern void pmd_free(struct mm_struct *mm, pmd_t *pmd); 22 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, in pmd_populate_kernel() argument 25 set_pmd(pmd, __pmd((unsigned long)pte)); in pmd_populate_kernel() 28 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, in pmd_populate() argument 31 set_pmd(pmd, __pmd((unsigned long)page_address(pte))); in pmd_populate() 33 #define pmd_pgtable(pmd) pmd_page(pmd) argument
|
/arch/sparc/include/asm/ |
D | pgalloc_32.h | 45 static inline void free_pmd_fast(pmd_t * pmd) in free_pmd_fast() argument 47 srmmu_free_nocache(pmd, SRMMU_PMD_TABLE_SIZE); in free_pmd_fast() 50 #define pmd_free(mm, pmd) free_pmd_fast(pmd) argument 51 #define __pmd_free_tlb(tlb, pmd, addr) pmd_free((tlb)->mm, pmd) argument 53 #define pmd_populate(mm, pmd, pte) pmd_set(pmd, pte) argument 54 #define pmd_pgtable(pmd) (pgtable_t)__pmd_page(pmd) argument
|
/arch/x86/mm/ |
D | pgtable.c | 61 void ___pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) in ___pmd_free_tlb() argument 63 struct page *page = virt_to_page(pmd); in ___pmd_free_tlb() 64 paravirt_release_pmd(__pa(pmd) >> PAGE_SHIFT); in ___pmd_free_tlb() 188 void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd) in pud_populate() argument 190 paravirt_alloc_pmd(mm, __pa(pmd) >> PAGE_SHIFT); in pud_populate() 194 set_pud(pudp, __pud(__pa(pmd) | _PAGE_PRESENT)); in pud_populate() 235 pmd_t *pmd = (pmd_t *)__get_free_page(gfp); in preallocate_pmds() local 236 if (!pmd) in preallocate_pmds() 238 if (pmd && !pgtable_pmd_page_ctor(virt_to_page(pmd))) { in preallocate_pmds() 239 free_page((unsigned long)pmd); in preallocate_pmds() [all …]
|
/arch/s390/include/asm/ |
D | pgtable.h | 696 static inline int pmd_large(pmd_t pmd) in pmd_large() argument 698 return (pmd_val(pmd) & _SEGMENT_ENTRY_LARGE) != 0; in pmd_large() 701 static inline int pmd_bad(pmd_t pmd) in pmd_bad() argument 703 if ((pmd_val(pmd) & _SEGMENT_ENTRY_TYPE_MASK) > 0 || pmd_large(pmd)) in pmd_bad() 705 return (pmd_val(pmd) & ~_SEGMENT_ENTRY_BITS) != 0; in pmd_bad() 730 static inline int pmd_present(pmd_t pmd) in pmd_present() argument 732 return pmd_val(pmd) != _SEGMENT_ENTRY_EMPTY; in pmd_present() 735 static inline int pmd_none(pmd_t pmd) in pmd_none() argument 737 return pmd_val(pmd) == _SEGMENT_ENTRY_EMPTY; in pmd_none() 741 static inline int pmd_write(pmd_t pmd) in pmd_write() argument [all …]
|
/arch/nios2/include/asm/ |
D | pgalloc.h | 17 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, in pmd_populate_kernel() argument 20 set_pmd(pmd, __pmd((unsigned long)pte)); in pmd_populate_kernel() 23 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, in pmd_populate() argument 26 set_pmd(pmd, __pmd((unsigned long)page_address(pte))); in pmd_populate() 28 #define pmd_pgtable(pmd) pmd_page(pmd) argument
|