/linux-master/arch/loongarch/include/asm/ |
H A D | pgalloc.h | 16 pmd_t *pmd, pte_t *pte) 18 set_pmd(pmd, __pmd((unsigned long)pte)); 21 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t pte) argument 23 set_pmd(pmd, __pmd((unsigned long)page_address(pte))); 28 static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) argument 30 set_pud(pud, __pud((unsigned long)pmd)); 57 pmd_t *pmd; local 69 pmd = ptdesc_address(ptdesc); 70 pmd_init(pmd); 71 return pmd; 15 pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) argument [all...] |
H A D | pgtable.h | 113 pr_err("%s:%d: bad pmd %016lx.\n", __FILE__, __LINE__, pmd_val(e)) 172 typedef struct { unsigned long pmd; } pmd_t; member in struct:__anon6 173 #define pmd_val(x) ((x).pmd) 214 * Empty pmd entries point to the invalid_pte_table. 216 static inline int pmd_none(pmd_t pmd) argument 218 return pmd_val(pmd) == (unsigned long)invalid_pte_table; 221 static inline int pmd_bad(pmd_t pmd) argument 223 return (pmd_val(pmd) & ~PAGE_MASK); 226 static inline int pmd_present(pmd_t pmd) argument 228 if (unlikely(pmd_val(pmd) 479 pmd_pfn(pmd_t pmd) argument 489 pmd_trans_huge(pmd_t pmd) argument 494 pmd_mkhuge(pmd_t pmd) argument 504 pmd_write(pmd_t pmd) argument 509 pmd_mkwrite_novma(pmd_t pmd) argument 517 pmd_wrprotect(pmd_t pmd) argument 524 pmd_dirty(pmd_t pmd) argument 529 pmd_mkclean(pmd_t pmd) argument 535 pmd_mkdirty(pmd_t pmd) argument 544 pmd_young(pmd_t pmd) argument 549 pmd_mkold(pmd_t pmd) argument 555 pmd_mkyoung(pmd_t pmd) argument 561 pmd_page(pmd_t pmd) argument 569 pmd_modify(pmd_t pmd, pgprot_t newprot) argument 576 pmd_mkinvalid(pmd_t pmd) argument 607 pmd_protnone(pmd_t pmd) argument [all...] |
/linux-master/include/linux/ |
H A D | page_table_check.h | 18 void __page_table_check_pmd_clear(struct mm_struct *mm, pmd_t pmd); 22 void __page_table_check_pmd_set(struct mm_struct *mm, pmd_t *pmdp, pmd_t pmd); 26 pmd_t pmd); 52 static inline void page_table_check_pmd_clear(struct mm_struct *mm, pmd_t pmd) argument 57 __page_table_check_pmd_clear(mm, pmd); 78 pmd_t pmd) 83 __page_table_check_pmd_set(mm, pmdp, pmd); 97 pmd_t pmd) 102 __page_table_check_pte_clear_range(mm, addr, pmd); 119 static inline void page_table_check_pmd_clear(struct mm_struct *mm, pmd_t pmd) argument 77 page_table_check_pmd_set(struct mm_struct *mm, pmd_t *pmdp, pmd_t pmd) argument 95 page_table_check_pte_clear_range(struct mm_struct *mm, unsigned long addr, pmd_t pmd) argument 132 page_table_check_pmd_set(struct mm_struct *mm, pmd_t *pmdp, pmd_t pmd) argument 142 page_table_check_pte_clear_range(struct mm_struct *mm, unsigned long addr, pmd_t pmd) argument [all...] |
/linux-master/arch/mips/include/asm/ |
H A D | pgtable.h | 65 #define pmd_phys(pmd) virt_to_phys((void *)pmd_val(pmd)) 67 static inline unsigned long pmd_pfn(pmd_t pmd) argument 69 return pmd_val(pmd) >> PFN_PTE_SHIFT; 73 #define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT)) 76 #define pmd_page_vaddr(pmd) pmd_val(pmd) 413 static inline int pmd_write(pmd_t pmd) argument 415 return !!(pmd_val(pmd) 418 pmd_page(pmd_t pmd) argument 628 pmd_trans_huge(pmd_t pmd) argument 633 pmd_mkhuge(pmd_t pmd) argument 643 pmd_wrprotect(pmd_t pmd) argument 649 pmd_mkwrite_novma(pmd_t pmd) argument 659 pmd_dirty(pmd_t pmd) argument 664 pmd_mkclean(pmd_t pmd) argument 670 pmd_mkdirty(pmd_t pmd) argument 680 pmd_young(pmd_t pmd) argument 685 pmd_mkold(pmd_t pmd) argument 692 pmd_mkyoung(pmd_t pmd) argument 703 pmd_soft_dirty(pmd_t pmd) argument 708 pmd_mksoft_dirty(pmd_t pmd) argument 714 pmd_clear_soft_dirty(pmd_t pmd) argument 725 pmd_modify(pmd_t pmd, pgprot_t newprot) argument 732 pmd_mkinvalid(pmd_t pmd) argument [all...] |
/linux-master/arch/x86/power/ |
H A D | hibernate_32.c | 59 static pte_t *resume_one_page_table_init(pmd_t *pmd) argument 61 if (pmd_none(*pmd)) { 66 set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE)); 68 BUG_ON(page_table != pte_offset_kernel(pmd, 0)); 73 return pte_offset_kernel(pmd, 0); 85 pmd_t *pmd; local 94 pmd = resume_one_md_table_init(pgd); 95 if (!pmd) 101 for (pmd_idx = 0; pmd_idx < PTRS_PER_PMD; pmd++, pmd_idx++) { 110 set_pmd(pmd, pfn_pm 148 pmd_t *pmd; local [all...] |
/linux-master/arch/m68k/include/asm/ |
H A D | sun3_pgalloc.h | 26 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) argument 28 pmd_val(*pmd) = __pa((unsigned long)pte); 31 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t page) argument 33 pmd_val(*pmd) = __pa((unsigned long)page_address(page)); 37 * allocating and freeing a pmd is trivial: the 1-entry pmd is
|
/linux-master/arch/sparc/include/asm/ |
H A D | pgalloc_32.h | 45 static inline void free_pmd_fast(pmd_t * pmd) argument 47 srmmu_free_nocache(pmd, SRMMU_PMD_TABLE_SIZE); 50 #define pmd_free(mm, pmd) free_pmd_fast(pmd) 51 #define __pmd_free_tlb(tlb, pmd, addr) pmd_free((tlb)->mm, pmd) 53 #define pmd_populate(mm, pmd, pte) pmd_set(pmd, pte)
|
/linux-master/arch/mips/mm/ |
H A D | pgtable-32.c | 36 pmd_t pmd; local 38 pmd_val(pmd) = (page_to_pfn(page) << PFN_PTE_SHIFT) | pgprot_val(prot); 40 return pmd; 45 pmd_t *pmdp, pmd_t pmd) 47 *pmdp = pmd; 59 pmd_t *pmd; local 85 pmd = pmd_offset(pud, vaddr); 86 pte = pte_offset_kernel(pmd, vaddr); 44 set_pmd_at(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp, pmd_t pmd) argument
|
H A D | hugetlbpage.c | 47 pmd_t *pmd = NULL; local 55 pmd = pmd_offset(pud, addr); 58 return (pte_t *) pmd; 61 int pmd_huge(pmd_t pmd) argument 63 return (pmd_val(pmd) & _PAGE_HUGE) != 0;
|
/linux-master/arch/powerpc/include/asm/book3s/64/ |
H A D | pgtable-64k.h | 14 * returns true for pmd migration entries, THP, devmap, hugetlb 17 static inline int pmd_huge(pmd_t pmd) argument 22 return !!(pmd_raw(pmd) & cpu_to_be64(_PAGE_PTE)); 34 * With 64k page size, we have hugepage ptes in the pgd and pmd entries. We don't
|
H A D | pgtable.h | 44 * We need to mark a pmd pte invalid while splitting. We can do that by clearing 160 /* pmd table use page table fragments */ 616 * This is potentially called with a pmd as the argument, in which case it's not 661 #define __pmd_to_swp_entry(pmd) (__pte_to_swp_entry(pmd_pte(pmd))) 817 static inline int pmd_none(pmd_t pmd) argument 819 return !pmd_raw(pmd); 822 static inline int pmd_present(pmd_t pmd) argument 825 * A pmd is considerent present if _PAGE_PRESENT is set. 826 * We also need to consider the pmd presen 836 pmd_is_serializing(pmd_t pmd) argument 853 pmd_bad(pmd_t pmd) argument 1030 pmd_pte(pmd_t pmd) argument 1040 pmdp_ptep(pmd_t *pmd) argument 1067 pmd_protnone(pmd_t pmd) argument 1076 pmd_access_permitted(pmd_t pmd, bool write) argument 1104 update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long addr, pmd_t *pmd) argument 1203 pmd_trans_huge(pmd_t pmd) argument 1241 __pmd_mkhuge(pmd_t pmd) argument 1259 pmd_mkhuge(pmd_t pmd) argument 1379 pmd_mkdevmap(pmd_t pmd) argument 1394 pmd_devmap(pmd_t pmd) argument 1433 pmd_leaf(pmd_t pmd) argument [all...] |
/linux-master/drivers/pmdomain/bcm/ |
H A D | bcm63xx-power.c | 38 static int bcm63xx_power_get_state(struct bcm63xx_power_dev *pmd, bool *is_on) argument 40 struct bcm63xx_power *power = pmd->power; 42 if (!pmd->mask) { 47 *is_on = !(__raw_readl(power->base) & pmd->mask); 52 static int bcm63xx_power_set_state(struct bcm63xx_power_dev *pmd, bool on) argument 54 struct bcm63xx_power *power = pmd->power; 58 if (!pmd->mask) 64 val &= ~pmd->mask; 66 val |= pmd->mask; 75 struct bcm63xx_power_dev *pmd local 83 struct bcm63xx_power_dev *pmd = container_of(genpd, local 139 struct bcm63xx_power_dev *pmd = &power->dev[ndom]; local [all...] |
/linux-master/arch/arm/include/asm/ |
H A D | pgtable-2level.h | 181 * The "pud_xxx()" functions here are trivial when the pmd is folded into 214 #define pmd_pfn(pmd) (__phys_to_pfn(pmd_val(pmd) & PHYS_MASK)) 216 #define pmd_leaf(pmd) (pmd_val(pmd) & 2) 217 #define pmd_bad(pmd) (pmd_val(pmd) & 2) 218 #define pmd_present(pmd) (pmd_val(pmd)) 234 /* we don't need complex calculations here as the pmd i [all...] |
/linux-master/arch/powerpc/include/asm/nohash/64/ |
H A D | pgtable.h | 96 static inline pte_t pmd_pte(pmd_t pmd) argument 98 return __pte(pmd_val(pmd)); 101 #define pmd_none(pmd) (!pmd_val(pmd)) 102 #define pmd_bad(pmd) (!is_kernel_addr(pmd_val(pmd)) \ 103 || (pmd_val(pmd) & PMD_BAD_BITS)) 104 #define pmd_present(pmd) (!pmd_none(pmd)) 105 #define pmd_page_vaddr(pmd) ((cons [all...] |
/linux-master/arch/x86/include/asm/ |
H A D | pgtable.h | 28 bool __init __early_make_pgtable(unsigned long address, pmdval_t pmd); 73 #define set_pmd(pmdp, pmd) native_set_pmd(pmdp, pmd) 97 #define pmd_clear(pmd) native_pmd_clear(pmd) 144 static inline bool pmd_dirty(pmd_t pmd) argument 146 return pmd_flags(pmd) & _PAGE_DIRTY_BITS; 149 static inline bool pmd_shstk(pmd_t pmd) argument 152 (pmd_flags(pmd) & (_PAGE_RW | _PAGE_DIRTY | _PAGE_PSE)) == 157 static inline int pmd_young(pmd_t pmd) argument 182 pmd_write(pmd_t pmd) argument 230 pmd_pfn(pmd_t pmd) argument 271 pmd_trans_huge(pmd_t pmd) argument 290 pmd_devmap(pmd_t pmd) argument 493 pmd_set_flags(pmd_t pmd, pmdval_t set) argument 500 pmd_clear_flags(pmd_t pmd, pmdval_t clear) argument 508 pmd_mksaveddirty(pmd_t pmd) argument 517 pmd_clear_saveddirty(pmd_t pmd) argument 525 pmd_wrprotect(pmd_t pmd) argument 538 pmd_uffd_wp(pmd_t pmd) argument 543 pmd_mkuffd_wp(pmd_t pmd) argument 548 pmd_clear_uffd_wp(pmd_t pmd) argument 554 pmd_mkold(pmd_t pmd) argument 559 pmd_mkclean(pmd_t pmd) argument 564 pmd_mkdirty(pmd_t pmd) argument 571 pmd_mkwrite_shstk(pmd_t pmd) argument 578 pmd_mkdevmap(pmd_t pmd) argument 583 pmd_mkhuge(pmd_t pmd) argument 588 pmd_mkyoung(pmd_t pmd) argument 593 pmd_mkwrite_novma(pmd_t pmd) argument 690 pmd_soft_dirty(pmd_t pmd) argument 705 pmd_mksoft_dirty(pmd_t pmd) argument 720 pmd_clear_soft_dirty(pmd_t pmd) argument 787 pmd_mkinvalid(pmd_t pmd) argument 828 pmd_modify(pmd_t pmd, pgprot_t newprot) argument 991 pmd_present(pmd_t pmd) argument 1013 pmd_protnone(pmd_t pmd) argument 1020 pmd_none(pmd_t pmd) argument 1028 pmd_page_vaddr(pmd_t pmd) argument 1055 pmd_bad(pmd_t pmd) argument 1238 set_pmd_at(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp, pmd_t pmd) argument 1346 pmd_t pmd = native_pmdp_get_and_clear(pmdp); local 1383 pmdp_establish(struct vm_area_struct *vma, unsigned long address, pmd_t *pmdp, pmd_t pmd) argument 1516 update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long addr, pmd_t *pmd) argument 1556 pmd_swp_mksoft_dirty(pmd_t pmd) argument 1561 pmd_swp_soft_dirty(pmd_t pmd) argument 1566 pmd_swp_clear_soft_dirty(pmd_t pmd) argument 1589 pmd_swp_mkuffd_wp(pmd_t pmd) argument 1594 pmd_swp_uffd_wp(pmd_t pmd) argument 1599 pmd_swp_clear_uffd_wp(pmd_t pmd) argument 1657 pmd_access_permitted(pmd_t pmd, bool write) argument 1696 pmd_user_accessible_page(pmd_t pmd) argument [all...] |
/linux-master/arch/powerpc/mm/kasan/ |
H A D | 8xx.c | 12 pmd_t *pmd = pmd_off_k(k_start); local 15 for (k_cur = k_start; k_cur != k_end; k_cur = k_next, pmd += 2, block += SZ_8M) { 20 if ((void *)pmd_page_vaddr(*pmd) != kasan_early_shadow_pte) 29 hugepd_populate_kernel((hugepd_t *)pmd, (pte_t *)new, PAGE_SHIFT_8M); 30 hugepd_populate_kernel((hugepd_t *)pmd + 1, (pte_t *)new, PAGE_SHIFT_8M); 61 pmd_t *pmd = pmd_off_k(k_cur); local 68 __set_pte_at(&init_mm, k_cur, pte_offset_kernel(pmd, k_cur), pte, 0);
|
H A D | init_32.c | 33 pmd_t *pmd; local 36 pmd = pmd_off_k(k_start); 38 for (k_cur = k_start; k_cur != k_end; k_cur = k_next, pmd++) { 42 if ((void *)pmd_page_vaddr(*pmd) != kasan_early_shadow_pte) 50 pmd_populate_kernel(&init_mm, pmd, new); 73 pmd_t *pmd = pmd_off_k(k_cur); local 77 __set_pte_at(&init_mm, k_cur, pte_offset_kernel(pmd, k_cur), pte, 0); 89 pmd_t *pmd = pmd_off_k(k_cur); local 90 pte_t *ptep = pte_offset_kernel(pmd, k_cur); 182 pmd_t *pmd local [all...] |
/linux-master/mm/kasan/ |
H A D | init.c | 70 static inline bool kasan_pte_table(pmd_t pmd) argument 72 return pmd_page(pmd) == virt_to_page(lm_alias(kasan_early_shadow_pte)); 92 static void __ref zero_pte_populate(pmd_t *pmd, unsigned long addr, argument 95 pte_t *pte = pte_offset_kernel(pmd, addr); 105 pte = pte_offset_kernel(pmd, addr); 112 pmd_t *pmd = pmd_offset(pud, addr); local 119 pmd_populate_kernel(&init_mm, pmd, 124 if (pmd_none(*pmd)) { 134 pmd_populate_kernel(&init_mm, pmd, p); 136 zero_pte_populate(pmd, add 155 pmd_t *pmd; local 198 pmd_t *pmd; local 250 pmd_t *pmd; local 292 kasan_free_pte(pte_t *pte_start, pmd_t *pmd) argument 309 pmd_t *pmd; local 374 kasan_remove_pmd_table(pmd_t *pmd, unsigned long addr, unsigned long end) argument 406 pmd_t *pmd, *pmd_base; local [all...] |
/linux-master/drivers/pmdomain/starfive/ |
H A D | jh71xx-pmu.c | 65 int (*pmu_set_state)(struct jh71xx_pmu_dev *pmd, 85 static int jh71xx_pmu_get_state(struct jh71xx_pmu_dev *pmd, u32 mask, bool *is_on) argument 87 struct jh71xx_pmu *pmu = pmd->pmu; 97 static int jh7110_pmu_set_state(struct jh71xx_pmu_dev *pmd, u32 mask, bool on) argument 99 struct jh71xx_pmu *pmu = pmd->pmu; 158 pmd->genpd.name, on ? "on" : "off"); 165 static int jh7110_aon_pmu_set_state(struct jh71xx_pmu_dev *pmd, u32 mask, bool on) argument 167 struct jh71xx_pmu *pmu = pmd->pmu; 185 static int jh71xx_pmu_set_state(struct jh71xx_pmu_dev *pmd, u32 mask, bool on) argument 187 struct jh71xx_pmu *pmu = pmd 210 struct jh71xx_pmu_dev *pmd = container_of(genpd, local 219 struct jh71xx_pmu_dev *pmd = container_of(genpd, local 289 struct jh71xx_pmu_dev *pmd; local [all...] |
/linux-master/arch/hexagon/include/asm/ |
H A D | pgalloc.h | 44 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, argument 51 set_pmd(pmd, __pmd(((unsigned long)page_to_pfn(pte) << PAGE_SHIFT) | 57 * share the same pmd's for their kernel mappings, but the v0.3 64 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, argument 77 set_pmd(pmd, __pmd(((unsigned long)__pa(pte)) | HEXAGON_L1_PTE_SIZE)); 83 pmdindex = (pgd_t *)pmd - mm->pgd;
|
/linux-master/arch/csky/mm/ |
H A D | highmem.c | 24 pmd_t *pmd; local 33 pmd = pmd_offset(pud, vaddr); 34 pte = pte_offset_kernel(pmd, vaddr);
|
/linux-master/arch/sh/include/asm/ |
H A D | pgtable-3level.h | 29 printk("%s:%d: bad pmd %016llx.\n", __FILE__, __LINE__, pmd_val(e)) 36 unsigned long long pmd; member in union:__anon1 38 #define pmd_val(x) ((x).pmd) 39 #define __pmd(x) ((pmd_t) { .pmd = (x) } )
|
/linux-master/arch/arc/include/asm/ |
H A D | pgtable-levels.h | 138 * 3rd level paging: pmd 141 pr_crit("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e)) 143 #define pmd_pfn(pmd) ((pmd_val(pmd) & PMD_MASK) >> PAGE_SHIFT) 154 * In 3+ level paging (pgd -> pmd -> pte), pmd_* macros work on pmd 160 #define pmd_page_vaddr(pmd) (pmd_val(pmd) & PAGE_MASK) 161 #define pmd_pfn(pmd) ((pmd_val(pmd) [all...] |
/linux-master/arch/xtensa/mm/ |
H A D | mmu.c | 26 pmd_t *pmd = pmd_off_k(vaddr); local 43 for (i = 0; i < n_pages; i += PTRS_PER_PTE, ++pmd) { 46 BUG_ON(!pmd_none(*pmd)); 47 set_pmd(pmd, __pmd(((unsigned long)cur_pte) & PAGE_MASK)); 48 BUG_ON(cur_pte != pte_offset_kernel(pmd, 0)); 49 pr_debug("%s: pmd: 0x%p, pte: 0x%p\n", 50 __func__, pmd, cur_pte);
|
H A D | kasan_init.c | 21 pmd_t *pmd = pmd_off_k(vaddr); local 29 for (vaddr = 0; vaddr < KASAN_SHADOW_SIZE; vaddr += PMD_SIZE, ++pmd) { 30 BUG_ON(!pmd_none(*pmd)); 31 set_pmd(pmd, __pmd((unsigned long)kasan_early_shadow_pte)); 41 pmd_t *pmd = pmd_off_k(vaddr); local 67 set_pmd(pmd + i, __pmd((unsigned long)pte));
|