/arch/powerpc/include/asm/ |
D | pgalloc-32.h | 8 extern void __bad_pte(pmd_t *pmd); 23 #define pmd_populate_kernel(mm, pmd, pte) \ argument 24 (pmd_val(*(pmd)) = __pa(pte) | _PMD_PRESENT) 25 #define pmd_populate(mm, pmd, pte) \ argument 26 (pmd_val(*(pmd)) = (page_to_pfn(pte) << PAGE_SHIFT) | _PMD_PRESENT) 27 #define pmd_pgtable(pmd) pmd_page(pmd) argument 29 #define pmd_populate_kernel(mm, pmd, pte) \ argument 30 (pmd_val(*(pmd)) = (unsigned long)pte | _PMD_PRESENT) 31 #define pmd_populate(mm, pmd, pte) \ argument 32 (pmd_val(*(pmd)) = (unsigned long)lowmem_page_address(pte) | _PMD_PRESENT) [all …]
|
D | pgalloc-64.h | 52 static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) in pud_populate() argument 54 pud_set(pud, (unsigned long)pmd); in pud_populate() 57 #define pmd_populate(mm, pmd, pte_page) \ argument 58 pmd_populate_kernel(mm, pmd, page_address(pte_page)) 59 #define pmd_populate_kernel(mm, pmd, pte) pmd_set(pmd, (unsigned long)(pte)) argument 60 #define pmd_pgtable(pmd) pmd_page(pmd) argument 65 #define pud_populate(mm, pud, pmd) pud_set(pud, (unsigned long)pmd) argument 67 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, in pmd_populate_kernel() argument 70 pmd_set(pmd, (unsigned long)pte); in pmd_populate_kernel() 73 #define pmd_populate(mm, pmd, pte_page) \ argument [all …]
|
/arch/parisc/include/asm/ |
D | pgalloc.h | 58 static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmd) in pgd_populate() argument 61 (__u32)(__pa((unsigned long)pmd) >> PxD_VALUE_SHIFT)); in pgd_populate() 66 pmd_t *pmd = (pmd_t *)__get_free_pages(GFP_KERNEL|__GFP_REPEAT, in pmd_alloc_one() local 68 if (pmd) in pmd_alloc_one() 69 memset(pmd, 0, PAGE_SIZE<<PMD_ORDER); in pmd_alloc_one() 70 return pmd; in pmd_alloc_one() 73 static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) in pmd_free() argument 76 if(pmd_flag(*pmd) & PxD_FLAG_ATTACHED) in pmd_free() 81 free_pages((unsigned long)pmd, PMD_ORDER); in pmd_free() 95 #define pgd_populate(mm, pmd, pte) BUG() argument [all …]
|
/arch/s390/include/asm/ |
D | pgalloc.h | 72 #define pud_populate(mm, pud, pmd) BUG() argument 73 #define pud_populate_kernel(mm, pud, pmd) BUG() argument 105 #define pmd_free(mm, pmd) crst_table_free(mm, (unsigned long *) pmd) argument 124 pud_t *pud, pmd_t *pmd) in pud_populate_kernel() argument 126 pud_val(*pud) = _REGION3_ENTRY | __pa(pmd); in pud_populate_kernel() 129 static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) in pud_populate() argument 131 pud_populate_kernel(mm, pud, pmd); in pud_populate() 134 pmd = get_shadow_table(pmd); in pud_populate() 135 pud_populate_kernel(mm, pud, pmd); in pud_populate() 150 pmd_t *pmd, pte_t *pte) in pmd_populate_kernel() argument [all …]
|
/arch/mips/include/asm/ |
D | pgalloc.h | 16 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, in pmd_populate_kernel() argument 19 set_pmd(pmd, __pmd((unsigned long)pte)); in pmd_populate_kernel() 22 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, in pmd_populate() argument 25 set_pmd(pmd, __pmd((unsigned long)page_address(pte))); in pmd_populate() 27 #define pmd_pgtable(pmd) pmd_page(pmd) argument 36 static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) in pud_populate() argument 38 set_pud(pud, __pud((unsigned long)pmd)); in pud_populate() 122 pmd_t *pmd; in pmd_alloc_one() local 124 pmd = (pmd_t *) __get_free_pages(GFP_KERNEL|__GFP_REPEAT, PMD_ORDER); in pmd_alloc_one() 125 if (pmd) in pmd_alloc_one() [all …]
|
/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() 50 pmd_t *pmd; in huge_pte_offset() local 57 pmd = pmd_offset(pud, addr); in huge_pte_offset() 58 if (pmd) in huge_pte_offset() 59 pte = pte_offset_map(pmd, addr); in huge_pte_offset() 77 int pmd_huge(pmd_t pmd) in pmd_huge() argument 88 pmd_t *pmd, int write) in follow_huge_pmd() argument
|
/arch/m68k/include/asm/ |
D | motorola_pgalloc.h | 71 static inline int pmd_free(struct mm_struct *mm, pmd_t *pmd) in pmd_free() argument 73 return free_pointer_table(pmd); in pmd_free() 76 static inline int __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) in __pmd_free_tlb() argument 78 return free_pointer_table(pmd); in __pmd_free_tlb() 93 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) in pmd_populate_kernel() argument 95 pmd_set(pmd, pte); in pmd_populate_kernel() 98 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t page) in pmd_populate() argument 100 pmd_set(pmd, page_address(page)); in pmd_populate() 102 #define pmd_pgtable(pmd) pmd_page(pmd) argument 104 static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmd) in pgd_populate() argument [all …]
|
D | sun3_pgtable.h | 121 #define __pmd_page(pmd) \ argument 122 ((unsigned long) __va (pmd_val (pmd) & PAGE_MASK)) 136 #define pmd_page(pmd) virt_to_page(__pmd_page(pmd)) argument 139 static inline int pmd_none2 (pmd_t *pmd) { return !pmd_val (*pmd); } in pmd_none2() argument 140 #define pmd_none(pmd) pmd_none2(&(pmd)) argument 142 static inline int pmd_bad2 (pmd_t *pmd) { return 0; } in pmd_bad2() argument 143 #define pmd_bad(pmd) pmd_bad2(&(pmd)) argument 144 static inline int pmd_present2 (pmd_t *pmd) { return pmd_val (*pmd) & SUN3_PMD_VALID; } in pmd_present2() argument 146 #define pmd_present(pmd) (!pmd_none2(&(pmd))) argument 219 #define pte_offset_kernel(pmd, address) ((pte_t *) __pmd_page(*pmd) + pte_index(address)) argument [all …]
|
D | sun3_pgalloc.h | 67 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) in pmd_populate_kernel() argument 69 pmd_val(*pmd) = __pa((unsigned long)pte); in pmd_populate_kernel() 72 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t page) in pmd_populate() argument 74 pmd_val(*pmd) = __pa((unsigned long)page_address(page)); in pmd_populate() 76 #define pmd_pgtable(pmd) pmd_page(pmd) argument 100 #define pgd_populate(mm, pmd, pte) BUG() argument
|
/arch/x86/include/asm/ |
D | pgalloc.h | 52 pmd_t *pmd, pte_t *pte) in pmd_populate_kernel() argument 55 set_pmd(pmd, __pmd(__pa(pte) | _PAGE_TABLE)); in pmd_populate_kernel() 58 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, in pmd_populate() argument 64 set_pmd(pmd, __pmd(((pteval_t)pfn << PAGE_SHIFT) | _PAGE_TABLE)); in pmd_populate() 67 #define pmd_pgtable(pmd) pmd_page(pmd) argument 75 static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) in pmd_free() argument 77 BUG_ON((unsigned long)pmd & (PAGE_SIZE-1)); in pmd_free() 78 free_page((unsigned long)pmd); in pmd_free() 81 extern void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd); 84 extern void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd); [all …]
|
/arch/alpha/include/asm/ |
D | pgalloc.h | 14 pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t pte) in pmd_populate() argument 16 pmd_set(pmd, (pte_t *)(page_to_pa(pte) + PAGE_OFFSET)); in pmd_populate() 18 #define pmd_pgtable(pmd) pmd_page(pmd) argument 21 pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) in pmd_populate_kernel() argument 23 pmd_set(pmd, pte); in pmd_populate_kernel() 27 pgd_populate(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmd) in pgd_populate() argument 29 pgd_set(pgd, pmd); in pgd_populate() 48 pmd_free(struct mm_struct *mm, pmd_t *pmd) in pmd_free() argument 50 free_page((unsigned long)pmd); in pmd_free()
|
/arch/um/include/asm/ |
D | pgalloc.h | 14 #define pmd_populate_kernel(mm, pmd, pte) \ argument 15 set_pmd(pmd, __pmd(_PAGE_TABLE + (unsigned long) __pa(pte))) 17 #define pmd_populate(mm, pmd, pte) \ argument 18 set_pmd(pmd, __pmd(_PAGE_TABLE + \ 21 #define pmd_pgtable(pmd) pmd_page(pmd) argument 51 static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) in pmd_free() argument 53 free_page((unsigned long)pmd); in pmd_free()
|
/arch/arm/mm/ |
D | pgd.c | 77 pmd_t *pmd; in free_pgd_slow() local 84 pmd = pmd_off(pgd, 0); in free_pgd_slow() 85 if (pmd_none(*pmd)) in free_pgd_slow() 87 if (pmd_bad(*pmd)) { in free_pgd_slow() 88 pmd_ERROR(*pmd); in free_pgd_slow() 89 pmd_clear(pmd); in free_pgd_slow() 93 pte = pmd_pgtable(*pmd); in free_pgd_slow() 94 pmd_clear(pmd); in free_pgd_slow() 96 pmd_free(mm, pmd); in free_pgd_slow()
|
D | ioremap.c | 45 static int remap_area_pte(pmd_t *pmd, unsigned long addr, unsigned long end, in remap_area_pte() argument 51 pte = pte_alloc_kernel(pmd, addr); in remap_area_pte() 74 pmd_t *pmd; in remap_area_pmd() local 77 pmd = pmd_alloc(&init_mm, pgd, addr); in remap_area_pmd() 78 if (!pmd) in remap_area_pmd() 83 ret = remap_area_pte(pmd, addr, next, phys_addr, type); in remap_area_pmd() 87 } while (pmd++, addr = next, addr != end); in remap_area_pmd() 147 pmd_t pmd, *pmdp = pmd_offset(pgd, addr); in unmap_area_sections() local 149 pmd = *pmdp; in unmap_area_sections() 150 if (!pmd_none(pmd)) { in unmap_area_sections() [all …]
|
/arch/x86/power/ |
D | hibernate_32.c | 61 static pte_t *resume_one_page_table_init(pmd_t *pmd) in resume_one_page_table_init() argument 63 if (pmd_none(*pmd)) { in resume_one_page_table_init() 68 set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE)); in resume_one_page_table_init() 70 BUG_ON(page_table != pte_offset_kernel(pmd, 0)); in resume_one_page_table_init() 75 return pte_offset_kernel(pmd, 0); in resume_one_page_table_init() 87 pmd_t *pmd; in resume_physical_mapping_init() local 96 pmd = resume_one_md_table_init(pgd); in resume_physical_mapping_init() 97 if (!pmd) in resume_physical_mapping_init() 103 for (pmd_idx = 0; pmd_idx < PTRS_PER_PMD; pmd++, pmd_idx++) { in resume_physical_mapping_init() 112 set_pmd(pmd, pfn_pmd(pfn, PAGE_KERNEL_LARGE_EXEC)); in resume_physical_mapping_init() [all …]
|
/arch/um/kernel/ |
D | mem.c | 92 static void __init one_page_table_init(pmd_t *pmd) in one_page_table_init() argument 94 if (pmd_none(*pmd)) { in one_page_table_init() 96 set_pmd(pmd, __pmd(_KERNPG_TABLE + in one_page_table_init() 98 if (pte != pte_offset_kernel(pmd, 0)) in one_page_table_init() 118 pmd_t *pmd; in fixrange_init() local 131 pmd = pmd_offset(pud, vaddr); in fixrange_init() 132 for (; (j < PTRS_PER_PMD) && (vaddr < end); pmd++, j++) { in fixrange_init() 133 one_page_table_init(pmd); in fixrange_init() 163 pmd_t *pmd; in init_highmem() local 175 pmd = pmd_offset(pud, vaddr); in init_highmem() [all …]
|
/arch/powerpc/mm/ |
D | tlb_hash32.c | 103 pmd_t *pmd; in flush_range() local 116 pmd = pmd_offset(pud_offset(pgd_offset(mm, start), start), start); in flush_range() 121 if (!pmd_none(*pmd)) { in flush_range() 123 flush_hash_pages(ctx, start, pmd_val(*pmd), count); in flush_range() 128 ++pmd; in flush_range() 169 pmd_t *pmd; in flush_tlb_page() local 176 pmd = pmd_offset(pud_offset(pgd_offset(mm, vmaddr), vmaddr), vmaddr); in flush_tlb_page() 177 if (!pmd_none(*pmd)) in flush_tlb_page() 178 flush_hash_pages(mm->context.id, vmaddr, pmd_val(*pmd), 1); in flush_tlb_page()
|
/arch/x86/mm/ |
D | init_64.c | 175 pmd_t *pmd; in set_pte_vaddr_pud() local 180 pmd = (pmd_t *) spp_getpage(); in set_pte_vaddr_pud() 181 pud_populate(&init_mm, pud, pmd); in set_pte_vaddr_pud() 182 if (pmd != pmd_offset(pud, 0)) { in set_pte_vaddr_pud() 184 pmd, pmd_offset(pud, 0)); in set_pte_vaddr_pud() 188 pmd = pmd_offset(pud, vaddr); in set_pte_vaddr_pud() 189 if (pmd_none(*pmd)) { in set_pte_vaddr_pud() 191 pmd_populate_kernel(&init_mm, pmd, pte); in set_pte_vaddr_pud() 192 if (pte != pte_offset_kernel(pmd, 0)) { in set_pte_vaddr_pud() 198 pte = pte_offset_kernel(pmd, vaddr); in set_pte_vaddr_pud() [all …]
|
D | pgtable_32.c | 31 pmd_t *pmd; in set_pte_vaddr() local 44 pmd = pmd_offset(pud, vaddr); in set_pte_vaddr() 45 if (pmd_none(*pmd)) { in set_pte_vaddr() 49 pte = pte_offset_kernel(pmd, vaddr); in set_pte_vaddr() 72 pmd_t *pmd; in set_pmd_pfn() local 88 pmd = pmd_offset(pud, vaddr); in set_pmd_pfn() 89 set_pmd(pmd, pfn_pmd(pfn, flags)); in set_pmd_pfn()
|
D | pgtable.c | 34 void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) in __pmd_free_tlb() argument 36 paravirt_release_pmd(__pa(pmd) >> PAGE_SHIFT); in __pmd_free_tlb() 37 tlb_remove_page(tlb, virt_to_page(pmd)); in __pmd_free_tlb() 125 void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd) in pud_populate() argument 127 paravirt_alloc_pmd(mm, __pa(pmd) >> PAGE_SHIFT); in pud_populate() 131 set_pud(pudp, __pud(__pa(pmd) | _PAGE_PRESENT)); in pud_populate() 164 pmd_t *pmd = (pmd_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); in preallocate_pmds() local 165 if (pmd == NULL) in preallocate_pmds() 167 pmds[i] = pmd; in preallocate_pmds() 192 pmd_t *pmd = (pmd_t *)pgd_page_vaddr(pgd); in pgd_mop_up_pmds() local [all …]
|
/arch/cris/include/asm/ |
D | pgalloc.h | 7 #define pmd_populate_kernel(mm, pmd, pte) pmd_set(pmd, pte) argument 8 #define pmd_populate(mm, pmd, pte) pmd_set(pmd, page_address(pte)) argument 9 #define pmd_pgtable(pmd) pmd_page(pmd) argument
|
/arch/ia64/include/asm/ |
D | pgalloc.h | 55 pud_populate(struct mm_struct *mm, pud_t * pud_entry, pmd_t * pmd) in pud_populate() argument 57 pud_val(*pud_entry) = __pa(pmd); in pud_populate() 65 static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) in pmd_free() argument 67 quicklist_free(0, NULL, pmd); in pmd_free() 70 #define __pmd_free_tlb(tlb, pmd) pmd_free((tlb)->mm, pmd) argument 77 #define pmd_pgtable(pmd) pmd_page(pmd) argument
|
/arch/sparc/include/asm/ |
D | pgalloc_32.h | 45 #define free_pmd_fast(pmd) BTFIXUP_CALL(free_pmd_fast)(pmd) argument 47 #define pmd_free(mm, pmd) free_pmd_fast(pmd) argument 48 #define __pmd_free_tlb(tlb, pmd) pmd_free((tlb)->mm, pmd) argument 52 #define pmd_pgtable(pmd) pmd_page(pmd) argument
|
/arch/powerpc/kernel/ |
D | softemu8xx.c | 45 pmd_t *pmd; in print_8xx_pte() local 51 pmd = pmd_offset(pud_offset(pgd, addr & PAGE_MASK), in print_8xx_pte() 53 if (pmd && pmd_present(*pmd)) { in print_8xx_pte() 54 pte = pte_offset_kernel(pmd, addr & PAGE_MASK); in print_8xx_pte() 86 pmd_t *pmd; in get_8xx_pte() local 92 pmd = pmd_offset(pud_offset(pgd, addr & PAGE_MASK), in get_8xx_pte() 94 if (pmd && pmd_present(*pmd)) { in get_8xx_pte() 95 pte = pte_offset_kernel(pmd, addr & PAGE_MASK); in get_8xx_pte()
|
/arch/xtensa/include/asm/ |
D | pgtable.h | 191 #define pmd_page_vaddr(pmd) ((unsigned long)(pmd_val(pmd) & PAGE_MASK)) argument 192 #define pmd_page(pmd) virt_to_page(pmd_val(pmd)) argument 204 #define pmd_none(pmd) (!pmd_val(pmd)) argument 205 #define pmd_present(pmd) (pmd_val(pmd) & PAGE_MASK) argument 206 #define pmd_bad(pmd) (pmd_val(pmd) & ~PAGE_MASK) argument 379 #define _PTE_OFFSET(pmd,adr,tmp) _PTE_INDEX(tmp, adr); \ 380 srli pmd, pmd, PAGE_SHIFT; \ 381 slli pmd, pmd, PAGE_SHIFT; \ 382 addx4 pmd, tmp, pmd
|