/linux/arch/arm/include/asm/ |
A D | pgtable-3level.h | 116 #define pmd_sect(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \ 138 #define pmd_bad(pmd) (!(pmd_val(pmd) & 2)) 175 : !!(pmd_val(pmd) & (val))) 176 #define pmd_isclear(pmd, val) (!(pmd_val(pmd) & (val))) 219 return __pmd(pmd_val(pmd) & ~L_PMD_SECT_VALID); in pmd_mkinvalid() 226 pmd_val(pmd) = (pmd_val(pmd) & ~mask) | (pgprot_val(newprot) & mask); in pmd_modify() 236 if (pmd_val(pmd) & L_PMD_SECT_NONE) in set_pmd_at() 237 pmd_val(pmd) &= ~L_PMD_SECT_VALID; in set_pmd_at() 240 pmd_val(pmd) &= ~PMD_SECT_AP2; in set_pmd_at() 242 pmd_val(pmd) |= PMD_SECT_AP2; in set_pmd_at() [all …]
|
A D | pgtable-2level.h | 211 #define pmd_large(pmd) (pmd_val(pmd) & 2) 212 #define pmd_leaf(pmd) (pmd_val(pmd) & 2) 213 #define pmd_bad(pmd) (pmd_val(pmd) & 2) 214 #define pmd_present(pmd) (pmd_val(pmd))
|
/linux/arch/mips/include/asm/ |
A D | pgtable.h | 93 #define pmd_page_vaddr(pmd) pmd_val(pmd) 427 return pmd_val(pmd) >> _PFN_SHIFT; 432 if (pmd_val(pmd) & _PAGE_HUGE) 604 pmd_val(pmd) |= _PAGE_HUGE; 620 pmd_val(pmd) |= _PAGE_WRITE; 621 if (pmd_val(pmd) & _PAGE_MODIFIED) 641 if (pmd_val(pmd) & _PAGE_WRITE) 661 pmd_val(pmd) |= _PAGE_ACCESSED; 664 pmd_val(pmd) |= _PAGE_SILENT_READ; 677 pmd_val(pmd) |= _PAGE_SOFT_DIRTY; [all …]
|
A D | pgtable-64.h | 163 printk("%s:%d: bad pmd %016lx.\n", __FILE__, __LINE__, pmd_val(e)) 235 #define pmd_val(x) ((x).pmd) macro 247 return pmd_val(pmd) == (unsigned long) invalid_pte_table; in pmd_none() 254 if (unlikely(pmd_val(pmd) & _PAGE_HUGE)) in pmd_bad() 258 if (unlikely(pmd_val(pmd) & ~PAGE_MASK)) in pmd_bad() 267 if (unlikely(pmd_val(pmd) & _PAGE_HUGE)) in pmd_present() 268 return pmd_val(pmd) & _PAGE_PRESENT; in pmd_present() 271 return pmd_val(pmd) != (unsigned long) invalid_pte_table; in pmd_present() 276 pmd_val(*pmdp) = ((unsigned long) invalid_pte_table); in pmd_clear()
|
A D | pgtable-32.h | 127 return pmd_val(pmd) == (unsigned long) invalid_pte_table; in pmd_none() 134 if (unlikely(pmd_val(pmd) & _PAGE_HUGE)) in pmd_bad() 138 if (unlikely(pmd_val(pmd) & ~PAGE_MASK)) in pmd_bad() 146 return pmd_val(pmd) != (unsigned long) invalid_pte_table; in pmd_present() 151 pmd_val(*pmdp) = ((unsigned long) invalid_pte_table); in pmd_clear()
|
/linux/arch/s390/include/asm/ |
A D | pgtable.h | 904 pmd_val(*pmdp) = _SEGMENT_ENTRY_EMPTY; in pmd_clear() 1358 pmd_val(pmd) &= ~_SEGMENT_ENTRY_WRITE; in pmd_wrprotect() 1359 pmd_val(pmd) |= _SEGMENT_ENTRY_PROTECT; in pmd_wrprotect() 1365 pmd_val(pmd) |= _SEGMENT_ENTRY_WRITE; in pmd_mkwrite() 1373 pmd_val(pmd) &= ~_SEGMENT_ENTRY_DIRTY; in pmd_mkclean() 1374 pmd_val(pmd) |= _SEGMENT_ENTRY_PROTECT; in pmd_mkclean() 1436 pmd_val(pmd) |= _SEGMENT_ENTRY_YOUNG; in pmd_mkyoung() 1444 pmd_val(pmd) &= ~_SEGMENT_ENTRY_YOUNG; in pmd_mkold() 1560 if (pmd_val(*pmdp) == pmd_val(entry)) in pmdp_set_access_flags() 1594 pmd_val(pmd) |= _SEGMENT_ENTRY_LARGE; in pmd_mkhuge() [all …]
|
/linux/arch/arc/include/asm/ |
A D | pgtable-levels.h | 144 pr_crit("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e)) 146 #define pmd_pfn(pmd) ((pmd_val(pmd) & PMD_MASK) >> PAGE_SHIFT) 159 #define pmd_none(x) (!pmd_val(x)) 160 #define pmd_bad(x) ((pmd_val(x) & ~PAGE_MASK)) 161 #define pmd_present(x) (pmd_val(x)) 162 #define pmd_clear(xp) do { pmd_val(*(xp)) = 0; } while (0) 163 #define pmd_page_vaddr(pmd) (pmd_val(pmd) & PAGE_MASK) 184 #define pmd_leaf(x) (pmd_val(x) & _PAGE_HW_SZ)
|
A D | hugepage.h | 15 return __pte(pmd_val(pmd)); in pmd_pte() 39 #define pmd_trans_huge(pmd) (pmd_val(pmd) & _PAGE_HW_SZ) 49 return __pmd((pmd_val(pmd) & (_PAGE_CHG_MASK | _PAGE_HW_SZ)) | pgprot_val(newprot)); in pmd_modify()
|
/linux/arch/sparc/include/asm/ |
A D | pgtable_64.h | 338 pte_t pte = __pte(pmd_val(pmd)); in pmd_modify() 422 pte_t pte = __pte(pmd_val(pmd)); in pmd_mkhuge() 685 pte_t pte = __pte(pmd_val(pmd)); in pmd_large() 692 pte_t pte = __pte(pmd_val(pmd)); in pmd_pfn() 700 pte_t pte = __pte(pmd_val(pmd)); in pmd_write() 710 pte_t pte = __pte(pmd_val(pmd)); in pmd_dirty() 717 pte_t pte = __pte(pmd_val(pmd)); in pmd_young() 724 pte_t pte = __pte(pmd_val(pmd)); in pmd_trans_huge() 731 pte_t pte = __pte(pmd_val(pmd)); in pmd_mkold() 793 return pmd_val(pmd) != 0UL; in pmd_present() [all …]
|
A D | pgtable_32.h | 132 if (srmmu_device_memory(pmd_val(pmd))) in pmd_page() 134 return pfn_to_page((pmd_val(pmd) & SRMMU_PTD_PMASK) >> (PAGE_SHIFT-4)); in pmd_page() 141 if (srmmu_device_memory(pmd_val(pmd))) in __pmd_page() 144 v = pmd_val(pmd) & SRMMU_PTD_PMASK; in __pmd_page() 150 unsigned long v = pmd_val(pmd) & SRMMU_PTD_PMASK; in pmd_page_vaddr() 186 return (pmd_val(pmd) & SRMMU_ET_MASK) != SRMMU_ET_PTD; in pmd_bad() 191 return ((pmd_val(pmd) & SRMMU_ET_MASK) == SRMMU_ET_PTD); in pmd_present() 196 return !pmd_val(pmd); in pmd_none() 201 set_pte((pte_t *)&pmd_val(*pmdp), __pte(0)); in pmd_clear()
|
/linux/arch/nios2/include/asm/ |
A D | pgtable.h | 179 return (pmd_val(pmd) != (unsigned long) invalid_pte_table) in pmd_present() 180 && (pmd_val(pmd) != 0UL); in pmd_present() 185 pmd_val(*pmdp) = (unsigned long) invalid_pte_table; in pmd_clear() 211 return (pmd_val(pmd) == in pmd_none() 212 (unsigned long) invalid_pte_table) || (pmd_val(pmd) == 0UL); in pmd_none() 215 #define pmd_bad(pmd) (pmd_val(pmd) & ~PAGE_MASK) 237 #define pmd_phys(pmd) virt_to_phys((void *)pmd_val(pmd)) 242 return pmd_val(pmd); in pmd_page_vaddr()
|
/linux/arch/um/include/asm/ |
A D | pgtable.h | 97 #define pmd_none(x) (!((unsigned long)pmd_val(x) & ~_PAGE_NEWPAGE)) 98 #define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) 100 #define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT) 101 #define pmd_clear(xp) do { pmd_val(*(xp)) = _PAGE_NEWPAGE; } while (0) 103 #define pmd_newpage(x) (pmd_val(x) & _PAGE_NEWPAGE) 104 #define pmd_mkuptodate(x) (pmd_val(x) &= ~_PAGE_NEWPAGE) 112 #define pmd_page(pmd) phys_to_page(pmd_val(pmd) & PAGE_MASK) 300 #define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
|
/linux/arch/m68k/include/asm/ |
A D | motorola_pgtable.h | 124 pmd_val(*pmdp) = virt_to_phys(ptep) | _PAGE_TABLE | _PAGE_ACCESSED; in pmd_set() 133 #define pmd_page_vaddr(pmd) ((unsigned long)__va(pmd_val(pmd) & _TABLE_MASK)) 145 #define pmd_none(pmd) (!pmd_val(pmd)) 146 #define pmd_bad(pmd) ((pmd_val(pmd) & _DESCTYPE_MASK) != _PAGE_TABLE) 147 #define pmd_present(pmd) (pmd_val(pmd) & _PAGE_TABLE) 148 #define pmd_clear(pmdp) ({ pmd_val(*pmdp) = 0; }) 167 printk("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e))
|
/linux/arch/alpha/include/asm/ |
A D | pgtable.h | 224 { pmd_val(*pmdp) = _PAGE_TABLE | ((((unsigned long) ptep) - PAGE_OFFSET) << (32-PAGE_SHIFT)); } in pmd_set() 233 return ((pmd_val(pmd) & _PFN_MASK) >> (32-PAGE_SHIFT)) + PAGE_OFFSET; in pmd_page_vaddr() 236 #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> 32)) 251 extern inline int pmd_none(pmd_t pmd) { return !pmd_val(pmd); } in pmd_none() 252 extern inline int pmd_bad(pmd_t pmd) { return (pmd_val(pmd) & ~_PFN_MASK) != _PAGE_TABLE; } in pmd_bad() 253 extern inline int pmd_present(pmd_t pmd) { return pmd_val(pmd) & _PAGE_VALID; } in pmd_present() 254 extern inline void pmd_clear(pmd_t * pmdp) { pmd_val(*pmdp) = 0; } in pmd_clear() 337 printk("%s:%d: bad pmd %016lx.\n", __FILE__, __LINE__, pmd_val(e))
|
/linux/arch/riscv/include/asm/ |
A D | pgtable.h | 188 return (pmd_val(pmd) & (_PAGE_PRESENT | _PAGE_PROT_NONE | _PAGE_LEAF)); in pmd_present() 193 return (pmd_val(pmd) & (_PAGE_PRESENT | _PAGE_PROT_NONE)); in pmd_present() 199 return (pmd_val(pmd) == 0); in pmd_none() 204 return !pmd_present(pmd) || (pmd_val(pmd) & _PAGE_LEAF); in pmd_bad() 210 return pmd_present(pmd) && (pmd_val(pmd) & _PAGE_LEAF); in pmd_leaf() 235 return pfn_to_page(pmd_val(pmd) >> _PAGE_PFN_SHIFT); in pmd_page() 240 return (unsigned long)pfn_to_virt(pmd_val(pmd) >> _PAGE_PFN_SHIFT); in pmd_page_vaddr() 245 return __pte(pmd_val(pmd)); in pmd_pte() 510 return __pmd(pmd_val(pmd) & ~(_PAGE_PRESENT|_PAGE_PROT_NONE)); in pmd_mkinvalid() 513 #define __pmd_to_phys(pmd) (pmd_val(pmd) >> _PAGE_PFN_SHIFT << PAGE_SHIFT) [all …]
|
A D | pgtable-64.h | 26 #define pmd_val(x) ((x).pmd) macro 79 return pmd_val(pmd) >> _PAGE_PFN_SHIFT; in _pmd_pfn() 85 pr_err("%s:%d: bad pmd %016lx.\n", __FILE__, __LINE__, pmd_val(e))
|
/linux/arch/s390/mm/ |
A D | pageattr.c | 123 ro = !!(pmd_val(*pmdp) & _SEGMENT_ENTRY_PROTECT); in split_pmd_page() 124 nx = !!(pmd_val(*pmdp) & _SEGMENT_ENTRY_NOEXEC); in split_pmd_page() 134 pmd_val(new) = __pa(pt_dir) | _SEGMENT_ENTRY; in split_pmd_page() 135 pgt_set((unsigned long *)pmdp, pmd_val(new), addr, CRDTE_DTT_SEGMENT); in split_pmd_page() 151 pmd_val(new) |= _SEGMENT_ENTRY_NOEXEC; in modify_pmd_page() 153 pmd_val(new) &= ~_SEGMENT_ENTRY_NOEXEC; in modify_pmd_page() 154 pgt_set((unsigned long *)pmdp, pmd_val(new), addr, CRDTE_DTT_SEGMENT); in modify_pmd_page() 211 pmd_val(*pmdp) = pmd_addr | prot; in split_pud_page()
|
/linux/arch/openrisc/include/asm/ |
A D | pgtable.h | 222 #define pmd_none(x) (!pmd_val(x)) 223 #define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK)) != _KERNPG_TABLE) 224 #define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT) 225 #define pmd_clear(xp) do { pmd_val(*(xp)) = 0; } while (0) 361 pmd_val(*pmdp) = _KERNPG_TABLE | (unsigned long) ptep; in pmd_set() 364 #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) 368 return ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)); in pmd_page_vaddr()
|
/linux/arch/sparc/mm/ |
A D | tlb.c | 172 if ((pmd_val(pmd) ^ pmd_val(orig)) & _PAGE_PMD_HUGE) { in __set_pmd_acct() 181 if (pmd_val(pmd) & _PAGE_PMD_HUGE) { in __set_pmd_acct() 206 pte_t orig_pte = __pte(pmd_val(orig)); in __set_pmd_acct() 248 entry = __pmd(pmd_val(*pmdp) & ~_PAGE_VALID); in pmdp_invalidate() 257 if ((pmd_val(entry) & _PAGE_PMD_HUGE) && in pmdp_invalidate()
|
/linux/arch/csky/include/asm/ |
A D | pgtable.h | 118 ptr = pmd_val(pmd); in pmd_page_vaddr() 123 #define pmd_phys(pmd) pmd_val(pmd) 138 return pmd_val(pmd) == __pa(invalid_pte_table); in pmd_none() 141 #define pmd_bad(pmd) (pmd_val(pmd) & ~PAGE_MASK) 145 return (pmd_val(pmd) != __pa(invalid_pte_table)); in pmd_present() 150 pmd_val(*p) = (__pa(invalid_pte_table)); in pmd_clear()
|
/linux/arch/powerpc/include/asm/nohash/32/ |
A D | pgtable.h | 203 #define pmd_none(pmd) (!pmd_val(pmd)) 204 #define pmd_bad(pmd) (pmd_val(pmd) & _PMD_BAD) 205 #define pmd_present(pmd) (pmd_val(pmd) & _PMD_PRESENT_MASK) 352 pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT) 355 ((unsigned long)(pmd_val(pmd) & ~(PTE_TABLE_SIZE - 1))) 357 pfn_to_page((__pa(pmd_val(pmd)) >> PAGE_SHIFT))
|
/linux/arch/powerpc/include/asm/nohash/64/ |
A D | pgtable.h | 136 return __pte(pmd_val(pmd)); in pmd_pte() 139 #define pmd_none(pmd) (!pmd_val(pmd)) 140 #define pmd_bad(pmd) (!is_kernel_addr(pmd_val(pmd)) \ 141 || (pmd_val(pmd) & PMD_BAD_BITS)) 143 #define pmd_page_vaddr(pmd) (pmd_val(pmd) & ~PMD_MASKED_BITS) 290 pr_err("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e))
|
/linux/arch/arm64/include/asm/ |
A D | pgtable.h | 165 pmd_val(pmd) &= ~pgprot_val(prot); in clear_pmd_bit() 171 pmd_val(pmd) |= pgprot_val(prot); in set_pmd_bit() 247 return __pmd(pmd_val(pmd) | PMD_SECT_CONT); in pmd_mkcont() 387 return __pte(pmd_val(pmd)); in pmd_pte() 434 return pmd_val(pmd) && pmd_present(pmd) && !(pmd_val(pmd) & PMD_TABLE_BIT); in pmd_trans_huge() 461 #define pmd_mkhuge(pmd) (__pmd(pmd_val(pmd) & ~PMD_TABLE_BIT)) 532 #define pmd_none(pmd) (!pmd_val(pmd)) 534 #define pmd_table(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \ 536 #define pmd_sect(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \ 574 set_swapper_pgd((pgd_t *)pmdp, __pgd(pmd_val(pmd))); in set_pmd() [all …]
|
/linux/arch/microblaze/include/asm/ |
A D | pgtable.h | 240 #define pmd_none(pmd) (!pmd_val(pmd)) 241 #define pmd_bad(pmd) ((pmd_val(pmd) & _PMD_PRESENT) == 0) 242 #define pmd_present(pmd) ((pmd_val(pmd) & _PMD_PRESENT) != 0) 243 #define pmd_clear(pmdp) do { pmd_val(*(pmdp)) = 0; } while (0) 399 return ((unsigned long) (pmd_val(pmd) & PAGE_MASK)); in pmd_page_vaddr() 403 #define pmd_page(pmd) (pfn_to_page(__pa(pmd_val(pmd)) >> PAGE_SHIFT))
|
/linux/arch/hexagon/include/asm/ |
A D | pgtable.h | 194 pmd_val(*pmd_entry_ptr) = _NULL_PMD; in pmd_clear() 214 return pmd_val(pmd) == _NULL_PMD; in pmd_none() 225 return pmd_val(pmd) != (unsigned long)_NULL_PMD; in pmd_present() 241 #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) 377 return (unsigned long)__va(pmd_val(pmd) & PAGE_MASK); in pmd_page_vaddr()
|