Home
last modified time | relevance | path

Searched refs:pmd_val (Results 1 – 25 of 129) sorted by relevance

123456

/linux-6.6.21/arch/loongarch/include/asm/
Dpgtable.h113 pr_err("%s:%d: bad pmd %016lx.\n", __FILE__, __LINE__, pmd_val(e))
173 #define pmd_val(x) ((x).pmd) macro
218 return pmd_val(pmd) == (unsigned long)invalid_pte_table; in pmd_none()
223 return (pmd_val(pmd) & ~PAGE_MASK); in pmd_bad()
228 if (unlikely(pmd_val(pmd) & _PAGE_HUGE)) in pmd_present()
229 return !!(pmd_val(pmd) & (_PAGE_PRESENT | _PAGE_PROTNONE | _PAGE_PRESENT_INVALID)); in pmd_present()
231 return pmd_val(pmd) != (unsigned long)invalid_pte_table; in pmd_present()
236 pmd_val(*pmdp) = ((unsigned long)invalid_pte_table); in pmd_clear()
241 #define pmd_phys(pmd) PHYSADDR(pmd_val(pmd))
247 #define pmd_page_vaddr(pmd) pmd_val(pmd)
[all …]
/linux-6.6.21/arch/arm/include/asm/
Dpgtable-3level.h117 #define pmd_table(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \
119 #define pmd_sect(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \
141 #define pmd_bad(pmd) (!(pmd_val(pmd) & 2))
177 #define pmd_isset(pmd, val) ((u32)(val) == (val) ? pmd_val(pmd) & (val) \
178 : !!(pmd_val(pmd) & (val)))
179 #define pmd_isclear(pmd, val) (!(pmd_val(pmd) & (val)))
197 #define pmd_trans_huge(pmd) (pmd_val(pmd) && !pmd_table(pmd))
201 static inline pmd_t pmd_##fn(pmd_t pmd) { pmd_val(pmd) op; return pmd; }
210 #define pmd_mkhuge(pmd) (__pmd(pmd_val(pmd) & ~PMD_TABLE_BIT))
212 #define pmd_pfn(pmd) (((pmd_val(pmd) & PMD_MASK) & PHYS_MASK) >> PAGE_SHIFT)
[all …]
Dpgtable-2level.h214 #define pmd_pfn(pmd) (__phys_to_pfn(pmd_val(pmd) & PHYS_MASK))
216 #define pmd_large(pmd) (pmd_val(pmd) & 2)
217 #define pmd_leaf(pmd) (pmd_val(pmd) & 2)
218 #define pmd_bad(pmd) (pmd_val(pmd) & 2)
219 #define pmd_present(pmd) (pmd_val(pmd))
/linux-6.6.21/arch/mips/include/asm/
Dpgtable.h65 #define pmd_phys(pmd) virt_to_phys((void *)pmd_val(pmd))
69 return pmd_val(pmd) >> PFN_PTE_SHIFT; in pmd_pfn()
76 #define pmd_page_vaddr(pmd) pmd_val(pmd)
415 return !!(pmd_val(pmd) & _PAGE_WRITE);
420 if (pmd_val(pmd) & _PAGE_HUGE)
630 return !!(pmd_val(pmd) & _PAGE_HUGE);
635 pmd_val(pmd) |= _PAGE_HUGE;
645 pmd_val(pmd) &= ~(_PAGE_WRITE | _PAGE_SILENT_WRITE);
651 pmd_val(pmd) |= _PAGE_WRITE;
652 if (pmd_val(pmd) & _PAGE_MODIFIED)
[all …]
Dpgtable-64.h158 printk("%s:%d: bad pmd %016lx.\n", __FILE__, __LINE__, pmd_val(e))
230 #define pmd_val(x) ((x).pmd) macro
242 return pmd_val(pmd) == (unsigned long) invalid_pte_table; in pmd_none()
249 if (unlikely(pmd_val(pmd) & _PAGE_HUGE)) in pmd_bad()
253 if (unlikely(pmd_val(pmd) & ~PAGE_MASK)) in pmd_bad()
262 if (unlikely(pmd_val(pmd) & _PAGE_HUGE)) in pmd_present()
263 return pmd_val(pmd) & _PAGE_PRESENT; in pmd_present()
266 return pmd_val(pmd) != (unsigned long) invalid_pte_table; in pmd_present()
271 pmd_val(*pmdp) = ((unsigned long) invalid_pte_table); in pmd_clear()
Dpgtable-32.h126 return pmd_val(pmd) == (unsigned long) invalid_pte_table; in pmd_none()
133 if (unlikely(pmd_val(pmd) & _PAGE_HUGE)) in pmd_bad()
137 if (unlikely(pmd_val(pmd) & ~PAGE_MASK)) in pmd_bad()
145 return pmd_val(pmd) != (unsigned long) invalid_pte_table; in pmd_present()
150 pmd_val(*pmdp) = ((unsigned long) invalid_pte_table); in pmd_clear()
/linux-6.6.21/arch/arc/include/asm/
Dpgtable-levels.h141 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)
156 #define pmd_none(x) (!pmd_val(x))
157 #define pmd_bad(x) ((pmd_val(x) & ~PAGE_MASK))
158 #define pmd_present(x) (pmd_val(x))
159 #define pmd_clear(xp) do { pmd_val(*(xp)) = 0; } while (0)
160 #define pmd_page_vaddr(pmd) (pmd_val(pmd) & PAGE_MASK)
161 #define pmd_pfn(pmd) ((pmd_val(pmd) & PAGE_MASK) >> PAGE_SHIFT)
183 #define pmd_leaf(x) (pmd_val(x) & _PAGE_HW_SZ)
/linux-6.6.21/arch/m68k/include/asm/
Dmotorola_pgtable.h98 pmd_val(*pmdp) = virt_to_phys(ptep) | _PAGE_TABLE | _PAGE_ACCESSED; in pmd_set()
107 #define pmd_page_vaddr(pmd) ((unsigned long)__va(pmd_val(pmd) & _TABLE_MASK))
120 #define pmd_none(pmd) (!pmd_val(pmd))
121 #define pmd_bad(pmd) ((pmd_val(pmd) & _DESCTYPE_MASK) != _PAGE_TABLE)
122 #define pmd_present(pmd) (pmd_val(pmd) & _PAGE_TABLE)
123 #define pmd_clear(pmdp) ({ pmd_val(*pmdp) = 0; })
125 #define pmd_pfn(pmd) ((pmd_val(pmd) & _TABLE_MASK) >> PAGE_SHIFT)
143 printk("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e))
Dmcf_pgtable.h97 #define pmd_pgtable(pmd) pfn_to_virt(pmd_val(pmd) >> PAGE_SHIFT)
119 #define pmd_page_vaddr(pmd) ((unsigned long) (pmd_val(pmd)))
139 static inline int pmd_none2(pmd_t *pmd) { return !pmd_val(*pmd); } in pmd_none2()
144 static inline void pmd_clear(pmd_t *pmdp) { pmd_val(*pmdp) = 0; } in pmd_clear()
295 #define pmd_pfn(pmd) (pmd_val(pmd) >> PAGE_SHIFT)
296 #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT))
Dsun3_pgtable.h98 return (unsigned long)__va(pmd_val(pmd) & PAGE_MASK); in pmd_page_vaddr()
114 #define pmd_pfn(pmd) (pmd_val(pmd) >> PAGE_SHIFT)
118 static inline int pmd_none2 (pmd_t *pmd) { return !pmd_val (*pmd); } in pmd_none2()
123 static inline int pmd_present2 (pmd_t *pmd) { return pmd_val (*pmd) & SUN3_PMD_VALID; } in pmd_present2()
126 static inline void pmd_clear (pmd_t *pmdp) { pmd_val (*pmdp) = 0; } in pmd_clear()
/linux-6.6.21/arch/nios2/include/asm/
Dpgtable.h160 return (pmd_val(pmd) != (unsigned long) invalid_pte_table) in pmd_present()
161 && (pmd_val(pmd) != 0UL); in pmd_present()
166 pmd_val(*pmdp) = (unsigned long) invalid_pte_table; in pmd_clear()
199 return (pmd_val(pmd) == in pmd_none()
200 (unsigned long) invalid_pte_table) || (pmd_val(pmd) == 0UL); in pmd_none()
203 #define pmd_bad(pmd) (pmd_val(pmd) & ~PAGE_MASK)
225 #define pmd_phys(pmd) virt_to_phys((void *)pmd_val(pmd))
231 return pmd_val(pmd); in pmd_page_vaddr()
/linux-6.6.21/arch/um/include/asm/
Dpgtable.h83 #define pmd_none(x) (!((unsigned long)pmd_val(x) & ~_PAGE_NEWPAGE))
84 #define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE)
86 #define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT)
87 #define pmd_clear(xp) do { pmd_val(*(xp)) = _PAGE_NEWPAGE; } while (0)
89 #define pmd_newpage(x) (pmd_val(x) & _PAGE_NEWPAGE)
90 #define pmd_mkuptodate(x) (pmd_val(x) &= ~_PAGE_NEWPAGE)
98 #define pmd_pfn(pmd) (pmd_val(pmd) >> PAGE_SHIFT)
99 #define pmd_page(pmd) phys_to_page(pmd_val(pmd) & PAGE_MASK)
283 #define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
/linux-6.6.21/arch/sparc/include/asm/
Dpgtable_64.h101 __FILE__, __LINE__, &(e), pmd_val(e), __builtin_return_address(0))
323 pte_t pte = __pte(pmd_val(pmd)); in pmd_modify()
432 return !!(pmd_val(pmd) & _PAGE_PMD_HUGE); in is_hugetlb_pmd()
443 pte_t pte = __pte(pmd_val(pmd)); in pmd_mkhuge()
686 pte_t pte = __pte(pmd_val(pmd)); in pmd_large()
693 pte_t pte = __pte(pmd_val(pmd)); in pmd_pfn()
701 pte_t pte = __pte(pmd_val(pmd)); in pmd_write()
711 pte_t pte = __pte(pmd_val(pmd)); in pmd_dirty()
719 pte_t pte = __pte(pmd_val(pmd)); in pmd_young()
726 pte_t pte = __pte(pmd_val(pmd)); in pmd_trans_huge()
[all …]
Dpgtable_32.h111 return (pmd_val(pmd) & SRMMU_PTD_PMASK) >> (PAGE_SHIFT-4); in pmd_pfn()
116 if (srmmu_device_memory(pmd_val(pmd))) in pmd_page()
125 if (srmmu_device_memory(pmd_val(pmd))) in __pmd_page()
128 v = pmd_val(pmd) & SRMMU_PTD_PMASK; in __pmd_page()
134 unsigned long v = pmd_val(pmd) & SRMMU_PTD_PMASK; in pmd_page_vaddr()
170 return (pmd_val(pmd) & SRMMU_ET_MASK) != SRMMU_ET_PTD; in pmd_bad()
175 return ((pmd_val(pmd) & SRMMU_ET_MASK) == SRMMU_ET_PTD); in pmd_present()
180 return !pmd_val(pmd); in pmd_none()
185 set_pte((pte_t *)&pmd_val(*pmdp), __pte(0)); in pmd_clear()
/linux-6.6.21/arch/alpha/include/asm/
Dpgtable.h210 { pmd_val(*pmdp) = _PAGE_TABLE | ((((unsigned long) ptep) - PAGE_OFFSET) << (32-PAGE_SHIFT)); } in pmd_set()
219 return ((pmd_val(pmd) & _PFN_MASK) >> (32-PAGE_SHIFT)) + PAGE_OFFSET; in pmd_page_vaddr()
222 #define pmd_pfn(pmd) (pmd_val(pmd) >> 32)
223 #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> 32))
238 extern inline int pmd_none(pmd_t pmd) { return !pmd_val(pmd); } in pmd_none()
239 extern inline int pmd_bad(pmd_t pmd) { return (pmd_val(pmd) & ~_PFN_MASK) != _PAGE_TABLE; } in pmd_bad()
240 extern inline int pmd_present(pmd_t pmd) { return pmd_val(pmd) & _PAGE_VALID; } in pmd_present()
241 extern inline void pmd_clear(pmd_t * pmdp) { pmd_val(*pmdp) = 0; } in pmd_clear()
357 printk("%s:%d: bad pmd %016lx.\n", __FILE__, __LINE__, pmd_val(e))
/linux-6.6.21/arch/loongarch/mm/
Dhugetlbpage.c55 return (pmd_val(pmd) & _PAGE_HUGE) != 0; in pmd_huge()
63 uint64_t pmd_to_entrylo(unsigned long pmd_val) in pmd_to_entrylo() argument
67 if (!pmd_huge(__pmd(pmd_val))) in pmd_to_entrylo()
70 val = pmd_val ^ _PAGE_HUGE; in pmd_to_entrylo()
/linux-6.6.21/arch/hexagon/include/asm/
Dpgtable.h170 pmd_val(*pmd_entry_ptr) = _NULL_PMD; in pmd_clear()
190 return pmd_val(pmd) == _NULL_PMD; in pmd_none()
201 return pmd_val(pmd) != (unsigned long)_NULL_PMD; in pmd_present()
217 #define pmd_pfn(pmd) (pmd_val(pmd) >> PAGE_SHIFT)
222 #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT))
351 return (unsigned long)__va(pmd_val(pmd) & PAGE_MASK); in pmd_page_vaddr()
/linux-6.6.21/arch/openrisc/include/asm/
Dpgtable.h207 #define pmd_none(x) (!pmd_val(x))
208 #define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK)) != _KERNPG_TABLE)
209 #define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT)
210 #define pmd_clear(xp) do { pmd_val(*(xp)) = 0; } while (0)
346 pmd_val(*pmdp) = _KERNPG_TABLE | (unsigned long) ptep; in pmd_set()
349 #define pmd_pfn(pmd) (pmd_val(pmd) >> PAGE_SHIFT)
350 #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT))
354 return ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)); in pmd_page_vaddr()
/linux-6.6.21/arch/s390/include/asm/
Dpgtable.h71 pr_err("%s:%d: bad pmd %016lx.\n", __FILE__, __LINE__, pmd_val(e))
549 return __pmd(pmd_val(pmd) & ~pgprot_val(prot)); in clear_pmd_bit()
554 return __pmd(pmd_val(pmd) | pgprot_val(prot)); in set_pmd_bit()
718 return (pmd_val(pmd) & _SEGMENT_ENTRY_LARGE) != 0; in pmd_large()
723 if ((pmd_val(pmd) & _SEGMENT_ENTRY_TYPE_MASK) > 0 || pmd_large(pmd)) in pmd_bad()
725 return (pmd_val(pmd) & ~_SEGMENT_ENTRY_BITS) != 0; in pmd_bad()
752 return pmd_val(pmd) != _SEGMENT_ENTRY_EMPTY; in pmd_present()
757 return pmd_val(pmd) == _SEGMENT_ENTRY_EMPTY; in pmd_none()
763 return (pmd_val(pmd) & _SEGMENT_ENTRY_WRITE) != 0; in pmd_write()
774 return (pmd_val(pmd) & _SEGMENT_ENTRY_DIRTY) != 0; in pmd_dirty()
[all …]
/linux-6.6.21/arch/csky/include/asm/
Dpgtable.h99 ptr = pmd_val(pmd); in pmd_page_vaddr()
104 #define pmd_phys(pmd) pmd_val(pmd)
119 return pmd_val(pmd) == __pa(invalid_pte_table); in pmd_none()
122 #define pmd_bad(pmd) (pmd_val(pmd) & ~PAGE_MASK)
126 return (pmd_val(pmd) != __pa(invalid_pte_table)); in pmd_present()
131 pmd_val(*p) = (__pa(invalid_pte_table)); in pmd_clear()
/linux-6.6.21/arch/sparc/mm/
Dtlb.c176 if ((pmd_val(pmd) ^ pmd_val(orig)) & _PAGE_PMD_HUGE) { in __set_pmd_acct()
185 if (pmd_val(pmd) & _PAGE_PMD_HUGE) { in __set_pmd_acct()
210 pte_t orig_pte = __pte(pmd_val(orig)); in __set_pmd_acct()
252 entry = __pmd(pmd_val(*pmdp) & ~_PAGE_VALID); in pmdp_invalidate()
261 if ((pmd_val(entry) & _PAGE_PMD_HUGE) && in pmdp_invalidate()
/linux-6.6.21/arch/microblaze/include/asm/
Dpgtable.h226 #define pmd_none(pmd) (!pmd_val(pmd))
227 #define pmd_bad(pmd) ((pmd_val(pmd) & _PMD_PRESENT) == 0)
228 #define pmd_present(pmd) ((pmd_val(pmd) & _PMD_PRESENT) != 0)
229 #define pmd_clear(pmdp) do { pmd_val(*(pmdp)) = 0; } while (0)
378 return ((unsigned long) (pmd_val(pmd) & PAGE_MASK)); in pmd_page_vaddr()
382 #define pmd_pfn(pmd) (__pa(pmd_val(pmd)) >> PAGE_SHIFT)
385 #define pmd_page(pmd) (pfn_to_page(__pa(pmd_val(pmd)) >> PAGE_SHIFT))
/linux-6.6.21/arch/powerpc/include/asm/nohash/32/
Dpgtable.h204 #define pmd_none(pmd) (!pmd_val(pmd))
205 #define pmd_bad(pmd) (pmd_val(pmd) & _PMD_BAD)
206 #define pmd_present(pmd) (pmd_val(pmd) & _PMD_PRESENT_MASK)
355 #define pmd_pfn(pmd) (pmd_val(pmd) >> PAGE_SHIFT)
358 ((const void *)(pmd_val(pmd) & ~(PTE_TABLE_SIZE - 1)))
359 #define pmd_pfn(pmd) (__pa(pmd_val(pmd)) >> PAGE_SHIFT)
/linux-6.6.21/arch/powerpc/include/asm/nohash/64/
Dpgtable.h123 return __pte(pmd_val(pmd)); in pmd_pte()
126 #define pmd_none(pmd) (!pmd_val(pmd))
127 #define pmd_bad(pmd) (!is_kernel_addr(pmd_val(pmd)) \
128 || (pmd_val(pmd) & PMD_BAD_BITS))
130 #define pmd_page_vaddr(pmd) ((const void *)(pmd_val(pmd) & ~PMD_MASKED_BITS))
275 pr_err("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e))
/linux-6.6.21/arch/riscv/include/asm/
Dpgtable.h224 return (pmd_val(pmd) & (_PAGE_PRESENT | _PAGE_PROT_NONE | _PAGE_LEAF)); in pmd_present()
229 return (pmd_val(pmd) & (_PAGE_PRESENT | _PAGE_PROT_NONE)); in pmd_present()
235 return (pmd_val(pmd) == 0); in pmd_none()
240 return !pmd_present(pmd) || (pmd_val(pmd) & _PAGE_LEAF); in pmd_bad()
246 return pmd_present(pmd) && (pmd_val(pmd) & _PAGE_LEAF); in pmd_leaf()
275 return pfn_to_page(__page_val_to_pfn(pmd_val(pmd))); in pmd_page()
280 return (unsigned long)pfn_to_virt(__page_val_to_pfn(pmd_val(pmd))); in pmd_page_vaddr()
285 return __pte(pmd_val(pmd)); in pmd_pte()
651 return __pmd(pmd_val(pmd) & ~(_PAGE_PRESENT|_PAGE_PROT_NONE)); in pmd_mkinvalid()
654 #define __pmd_to_phys(pmd) (__page_val_to_pfn(pmd_val(pmd)) << PAGE_SHIFT)
[all …]

123456