| /linux/arch/m68k/include/asm/ |
| H A D | mcf_pgtable.h | 101 pte_val(pte) = (pte_val(pte) & CF_PAGE_CHG_MASK) | pgprot_val(newprot); in pte_modify() 112 #define __pte_page(pte) ((void *) (pte_val(pte) & PAGE_MASK)) 117 return !pte_val(pte); in pte_none() 122 return pte_val(pte) & CF_PAGE_VALID; in pte_present() 128 pte_val(*ptep) = 0; in pte_clear() 142 __FILE__, __LINE__, pte_val(e)) 154 return pte_val(pte) & CF_PAGE_READABLE; in pte_read() 159 return pte_val(pte) & CF_PAGE_WRITABLE; in pte_write() 164 return pte_val(pte) & CF_PAGE_EXEC; in pte_exec() 169 return pte_val(pte) & CF_PAGE_DIRTY; in pte_dirty() [all …]
|
| H A D | motorola_pgtable.h | 86 pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); in pte_modify() 100 #define __pte_page(pte) ((unsigned long)__va(pte_val(pte) & PAGE_MASK)) 105 #define pte_none(pte) (!pte_val(pte)) 106 #define pte_present(pte) (pte_val(pte) & (_PAGE_PRESENT | _PAGE_PROTNONE)) 107 #define pte_clear(mm,addr,ptep) ({ pte_val(*(ptep)) = 0; }) 110 #define pte_page(pte) virt_to_page(__va(pte_val(pte))) 111 #define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT) 135 printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e)) 146 static inline int pte_write(pte_t pte) { return !(pte_val(pte) & _PAGE_RONLY); } in pte_write() 147 static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } in pte_dirty() [all …]
|
| H A D | sun3_pgtable.h | 81 pte_val(pte) = (pte_val(pte) & SUN3_PAGE_CHG_MASK) | pgprot_val(newprot); in pte_modify() 88 (__va ((pte_val (pte) & SUN3_PAGE_PGNUM_MASK) << PAGE_SHIFT)) 95 static inline int pte_none (pte_t pte) { return !pte_val (pte); } in pte_none() 96 static inline int pte_present (pte_t pte) { return pte_val (pte) & SUN3_PAGE_VALID; } in pte_present() 99 pte_val (*ptep) = 0; in pte_clear() 103 #define pte_pfn(pte) (pte_val(pte) & SUN3_PAGE_PGNUM_MASK) 105 ({ pte_t __pte; pte_val(__pte) = pfn | pgprot_val(pgprot); __pte; }) 124 pr_err("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e)) 134 static inline int pte_write(pte_t pte) { return pte_val(pte) & SUN3_PAGE_WRITEABLE; } in pte_write() 135 static inline int pte_dirty(pte_t pte) { return pte_val(pte) & SUN3_PAGE_MODIFIED; } in pte_dirty() [all …]
|
| /linux/arch/powerpc/include/asm/book3s/32/ |
| H A D | pgtable.h | 285 old = pte_val(*p); in pte_update() 334 unsigned long set = pte_val(entry) & in __ptep_set_access_flags() 343 #define pte_same(A,B) (((pte_val(A) ^ pte_val(B)) & ~_PAGE_HASHPTE) == 0) 366 #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) >> 3 }) 371 return pte_val(pte) & _PAGE_SWP_EXCLUSIVE; in pte_swp_exclusive() 376 return __pte(pte_val(pte) | _PAGE_SWP_EXCLUSIVE); in pte_swp_mkexclusive() 381 return __pte(pte_val(pte) & ~_PAGE_SWP_EXCLUSIVE); in pte_swp_clear_exclusive() 387 return !!(pte_val(pte) & _PAGE_READ); in pte_read() 392 return !!(pte_val(pte) & _PAGE_WRITE); in pte_write() 395 static inline int pte_dirty(pte_t pte) { return !!(pte_val(pte) & _PAGE_DIRTY); } in pte_dirty() [all …]
|
| /linux/arch/powerpc/include/asm/nohash/ |
| H A D | pgtable.h | 62 pte_basic_t old = pte_val(*p); in pte_update() 147 unsigned long set = pte_val(entry) & in __ptep_set_access_flags() 164 return __pte(pte_val(pte) | _PAGE_RW); in pte_mkwrite_novma() 170 return __pte(pte_val(pte) | _PAGE_DIRTY); in pte_mkdirty() 175 return __pte(pte_val(pte) | _PAGE_ACCESSED); in pte_mkyoung() 181 return __pte(pte_val(pte) & ~_PAGE_WRITE); in pte_wrprotect() 188 return __pte(pte_val(pte) | _PAGE_EXEC); in pte_mkexec() 195 return pte_val(pte) & _PAGE_WRITE; in pte_write() 198 static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } in pte_dirty() 199 static inline int pte_special(pte_t pte) { return pte_val(pte) & _PAGE_SPECIAL; } in pte_special() [all …]
|
| /linux/arch/loongarch/include/asm/ |
| H A D | pgtable.h | 132 pr_err("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e)) 330 pte_val(pte) = ((type & __SWP_TYPE_MASK) << __SWP_TYPE_SHIFT) | (offset << __SWP_OFFSET_SHIFT); in mk_swap_pte() 336 #define __swp_entry(type, offset) ((swp_entry_t) { pte_val(mk_swap_pte((type), (offset))) }) 340 #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) 345 return pte_val(pte) & _PAGE_SWP_EXCLUSIVE; in pte_swp_exclusive() 350 pte_val(pte) |= _PAGE_SWP_EXCLUSIVE; in pte_swp_mkexclusive() 356 pte_val(pte) &= ~_PAGE_SWP_EXCLUSIVE; in pte_swp_clear_exclusive() 360 #define pte_none(pte) (!(pte_val(pte) & ~_PAGE_GLOBAL)) 361 #define pte_present(pte) (pte_val(pte) & (_PAGE_PRESENT | _PAGE_PROTNONE)) 362 #define pte_no_exec(pte) (pte_val(pte) & _PAGE_NO_EXEC) [all …]
|
| /linux/arch/parisc/include/asm/ |
| H A D | pgtable.h | 79 printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e)) 265 #define pte_none(x) (pte_val(x) == 0) 266 #define pte_present(x) (pte_val(x) & _PAGE_PRESENT) 267 #define pte_user(x) (pte_val(x) & _PAGE_USER) 304 static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } in pte_dirty() 305 static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } in pte_young() 306 static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; } in pte_write() 307 static inline int pte_special(pte_t pte) { return pte_val(pte) & _PAGE_SPECIAL; } in pte_special() 309 static inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~_PAGE_DIRTY; return pte; } in pte_mkclean() 310 static inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } in pte_mkold() [all …]
|
| H A D | kfence.h | 35 set_pte(pte, __pte(pte_val(*pte) & ~_PAGE_PRESENT)); in kfence_protect_page() 37 set_pte(pte, __pte(pte_val(*pte) | _PAGE_PRESENT)); in kfence_protect_page()
|
| /linux/arch/riscv/include/asm/ |
| H A D | pgtable.h | 283 return pte_val(pte) & _PAGE_NAPOT; in pte_napot() 292 return __pte((pte_val(pte) & napot_mask) | napot_bit | _PAGE_NAPOT); in pte_mknapot() 309 unsigned long res = __page_val_to_pfn(pte_val(pte)); in pte_pfn() 334 return __pgprot(pte_val(pfn_pte(pfn, __pgprot(0))) ^ pte_val(pte)); in pte_pgprot() 339 return (pte_val(pte) & (_PAGE_PRESENT | _PAGE_PROT_NONE)); in pte_present() 345 if (pte_val(a) & _PAGE_PRESENT) in pte_accessible() 348 if ((pte_val(a) & _PAGE_PROT_NONE) && in pte_accessible() 357 return (pte_val(pte) == 0); in pte_none() 362 return pte_val(pte) & _PAGE_WRITE; in pte_write() 367 return pte_val(pte) & _PAGE_EXEC; in pte_exec() [all …]
|
| H A D | kfence.h | 21 set_pte(pte, __pte(pte_val(ptep_get(pte)) & ~_PAGE_PRESENT)); in kfence_protect_page() 23 set_pte(pte, __pte(pte_val(ptep_get(pte)) | _PAGE_PRESENT)); in kfence_protect_page()
|
| /linux/arch/arc/include/asm/ |
| H A D | pgtable-bits-arcv2.h | 80 #define pte_write(pte) (pte_val(pte) & _PAGE_WRITE) 81 #define pte_dirty(pte) (pte_val(pte) & _PAGE_DIRTY) 82 #define pte_young(pte) (pte_val(pte) & _PAGE_ACCESSED) 83 #define pte_special(pte) (pte_val(pte) & _PAGE_SPECIAL) 86 static inline pte_t pte_##fn(pte_t pte) { pte_val(pte) op; return pte; } 100 return __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot)); in pte_modify() 130 #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) 135 return pte_val(pte) & _PAGE_SWP_EXCLUSIVE; in pte_swp_exclusive()
|
| H A D | pgtable-levels.h | 169 pr_crit("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e)) 172 #define pte_none(x) (!pte_val(x)) 173 #define pte_present(x) (pte_val(x) & _PAGE_PRESENT) 177 #define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT)
|
| /linux/arch/arm64/include/asm/ |
| H A D | pgtable.h | 111 pr_err("%s:%d: bad pte %016llx.\n", __FILE__, __LINE__, pte_val(e)) 116 pte_val(pte) &= ~PTE_MAYBE_SHARED; in __pte_to_phys() 117 return (pte_val(pte) & PTE_ADDR_LOW) | in __pte_to_phys() 118 ((pte_val(pte) & PTE_ADDR_HIGH) << PTE_ADDR_HIGH_SHIFT); in __pte_to_phys() 127 return pte_val(pte) & PTE_ADDR_LOW; in __pte_to_phys() 140 #define pte_none(pte) (!pte_val(pte)) 147 #define pte_young(pte) (!!(pte_val(pte) & PTE_AF)) 148 #define pte_special(pte) (!!(pte_val(pte) & PTE_SPECIAL)) 149 #define pte_write(pte) (!!(pte_val(pte) & PTE_WRITE)) 150 #define pte_rdonly(pte) (!!(pte_val(pte) & PTE_RDONLY)) [all …]
|
| /linux/arch/powerpc/include/asm/nohash/32/ |
| H A D | pte-8xx.h | 89 return __pte(pte_val(pte) | _PAGE_RO); in pte_wrprotect() 96 return (pte_val(pte) & _PAGE_RO) != _PAGE_NA; in pte_read() 103 return !(pte_val(pte) & _PAGE_RO); in pte_write() 110 return __pte(pte_val(pte) & ~_PAGE_RO); in pte_mkwrite_novma() 117 return __pte(pte_val(pte) | _PAGE_SPS | _PAGE_HUGE); in pte_mkhuge() 134 unsigned long set = pte_val(entry) & (_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_EXEC); in __ptep_set_access_flags() 135 unsigned long clr = ~pte_val(entry) & _PAGE_RO; in __ptep_set_access_flags() 146 pte_basic_t val = pte_val(pte); in __pte_leaf_size() 191 pte_basic_t old = pte_val(*p); in __pte_update()
|
| H A D | hugetlb-8xx.h | 41 unsigned long clr = ~pte_val(pte_wrprotect(__pte(~0))); in huge_ptep_set_wrprotect() 42 unsigned long set = pte_val(pte_wrprotect(__pte(0))); in huge_ptep_set_wrprotect() 53 return __pte(pte_val(entry) | _PAGE_SPS); in arch_make_huge_pte() 55 return __pte(pte_val(entry) | _PAGE_SPS | _PAGE_HUGE); in arch_make_huge_pte()
|
| /linux/arch/arm/include/asm/ |
| H A D | pgtable-3level.h | 166 #define pte_same(pte_a,pte_b) ((pte_present(pte_a) ? pte_val(pte_a) & ~PTE_EXT_NG \ 167 : pte_val(pte_a)) \ 168 == (pte_present(pte_b) ? pte_val(pte_b) & ~PTE_EXT_NG \ 169 : pte_val(pte_b))) 171 #define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,__pte(pte_val(pte)|(ext))) 173 #define pte_huge(pte) (pte_val(pte) && !(pte_val(pte) & PTE_TABLE_BIT)) 174 #define pte_mkhuge(pte) (__pte(pte_val(pte) & ~PTE_TABLE_BIT)) 185 pte_val(pte) |= L_PTE_SPECIAL; in pte_mkspecial()
|
| H A D | hugetlb-3level.h | 24 if (pte_val(retval)) in huge_ptep_get() 25 pte_val(retval) |= L_PTE_VALID; in huge_ptep_get()
|
| H A D | pgtable-2level-types.h | 26 #define pte_val(x) ((x).pte) macro 44 #define pte_val(x) (x) macro
|
| /linux/arch/powerpc/include/asm/ |
| H A D | pgtable-types.h | 21 static inline pte_basic_t pte_val(pte_t x) in pte_val() function 27 static inline pte_basic_t pte_val(pte_t x) in pte_val() function 92 return pte_val(old) == __cmpxchg_u64(p, pte_val(old), pte_val(new)); in pte_xchg()
|
| /linux/arch/s390/include/asm/ |
| H A D | pgtable.h | 72 pr_err("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e)) 560 return __pte(pte_val(pte) & ~pgprot_val(prot)); in clear_pte_bit() 565 return __pte(pte_val(pte) | pgprot_val(prot)); in set_pte_bit() 818 return (pte_val(pte) & _PAGE_PRESENT) != 0; in pte_present() 824 return pte_val(pte) == _PAGE_INVALID; in pte_none() 830 return (pte_val(pte) & (_PAGE_PROTECT | _PAGE_PRESENT)) in pte_swap() 836 return (pte_val(pte) & _PAGE_SPECIAL); in pte_special() 842 return pte_val(a) == pte_val(b); in pte_same() 848 return pte_present(pte) && !(pte_val(pte) & _PAGE_READ); in pte_protnone() 860 return pte_val(pte) & _PAGE_SWP_EXCLUSIVE; in pte_swp_exclusive() [all …]
|
| /linux/arch/mips/include/asm/ |
| H A D | pgtable-bits.h | 214 static inline uint64_t pte_to_entrylo(unsigned long pte_val) in pte_to_entrylo() argument 229 return (pte_val >> _PAGE_GLOBAL_SHIFT) | in pte_to_entrylo() 230 ((pte_val & (_PAGE_NO_EXEC | _PAGE_NO_READ)) << sa); in pte_to_entrylo() 234 return pte_val >> _PAGE_GLOBAL_SHIFT; in pte_to_entrylo()
|
| /linux/drivers/accel/habanalabs/common/mmu/ |
| H A D | mmu_v1.c | 31 hop2_pte_addr, hop3_pte_addr, pte_val; in dram_default_mapping_init() local 81 pte_val = (hop1_addr & HOP_PHYS_ADDR_MASK) | PAGE_PRESENT_MASK; in dram_default_mapping_init() 82 hl_mmu_dr_write_pte(ctx, hop0_addr, pte_val); in dram_default_mapping_init() 84 pte_val = (hop2_addr & HOP_PHYS_ADDR_MASK) | PAGE_PRESENT_MASK; in dram_default_mapping_init() 85 hl_mmu_dr_write_pte(ctx, hop1_addr, pte_val); in dram_default_mapping_init() 90 pte_val = (ctx->dram_default_hops[i] & HOP_PHYS_ADDR_MASK) | in dram_default_mapping_init() 92 hl_mmu_dr_write_pte(ctx, hop2_pte_addr, pte_val); in dram_default_mapping_init() 97 pte_val = (prop->mmu_dram_default_page_addr & HOP_PHYS_ADDR_MASK) | in dram_default_mapping_init() 103 hl_mmu_dr_write_final_pte(ctx, hop3_pte_addr, pte_val); in dram_default_mapping_init()
|
| /linux/arch/powerpc/kvm/ |
| H A D | book3s_64_mmu_radix.c | 486 if (pte_val(*p) == 0) in kvmppc_unmap_free_pte() 671 WARN_ON_ONCE((pud_val(*pud) ^ pte_val(pte)) & in kvmppc_create_pte() 674 0, pte_val(pte), hgpa, PUD_SHIFT); in kvmppc_create_pte() 722 WARN_ON_ONCE((pmd_val(*pmd) ^ pte_val(pte)) & in kvmppc_create_pte() 725 0, pte_val(pte), lgpa, PMD_SHIFT); in kvmppc_create_pte() 771 WARN_ON_ONCE((pte_val(*ptep) ^ pte_val(pte)) & in kvmppc_create_pte() 773 kvmppc_radix_update_pte(kvm, ptep, 0, pte_val(pte), gpa, 0); in kvmppc_create_pte() 889 pte = __pte(pte_val(pte) | (hva & rpnmask)); in kvmppc_book3s_instantiate_page() 893 pte = __pte(pte_val(pte) | _PAGE_EXEC | _PAGE_ACCESSED); in kvmppc_book3s_instantiate_page() 895 if (pte_val(pte) & _PAGE_WRITE) in kvmppc_book3s_instantiate_page() [all …]
|
| /linux/arch/um/include/asm/ |
| H A D | pgtable-2level.h | 29 pte_val(e)) 39 #define pte_pfn(x) phys_to_pfn(pte_val(x))
|
| /linux/arch/sh/include/asm/ |
| H A D | page.h | 66 #define pte_val(x) \ macro 74 #define pte_val(x) ((x).pte_low) macro 86 #define pte_pgprot(x) __pgprot(pte_val(x) & PTE_FLAGS_MASK)
|