Home
last modified time | relevance | path

Searched full:pmd (Results 1 – 25 of 454) sorted by relevance

12345678910>>...19

/Linux-v6.1/drivers/md/
Ddm-thin-metadata.c230 struct dm_pool_metadata *pmd; member
413 static inline void pmd_write_lock_in_core(struct dm_pool_metadata *pmd) in pmd_write_lock_in_core() argument
414 __acquires(pmd->root_lock) in pmd_write_lock_in_core()
416 down_write(&pmd->root_lock); in pmd_write_lock_in_core()
419 static inline void pmd_write_lock(struct dm_pool_metadata *pmd) in pmd_write_lock() argument
421 pmd_write_lock_in_core(pmd); in pmd_write_lock()
422 if (unlikely(!pmd->in_service)) in pmd_write_lock()
423 pmd->in_service = true; in pmd_write_lock()
426 static inline void pmd_write_unlock(struct dm_pool_metadata *pmd) in pmd_write_unlock() argument
427 __releases(pmd->root_lock) in pmd_write_unlock()
[all …]
Ddm-thin-metadata.h48 int dm_pool_metadata_close(struct dm_pool_metadata *pmd);
61 int dm_pool_create_thin(struct dm_pool_metadata *pmd, dm_thin_id dev);
69 int dm_pool_create_snap(struct dm_pool_metadata *pmd, dm_thin_id dev,
77 int dm_pool_delete_thin_device(struct dm_pool_metadata *pmd,
84 int dm_pool_commit_metadata(struct dm_pool_metadata *pmd);
94 int dm_pool_abort_metadata(struct dm_pool_metadata *pmd);
99 int dm_pool_set_metadata_transaction_id(struct dm_pool_metadata *pmd,
103 int dm_pool_get_metadata_transaction_id(struct dm_pool_metadata *pmd,
115 int dm_pool_reserve_metadata_snap(struct dm_pool_metadata *pmd);
116 int dm_pool_release_metadata_snap(struct dm_pool_metadata *pmd);
[all …]
/Linux-v6.1/arch/arc/include/asm/
Dhugepage.h13 static inline pte_t pmd_pte(pmd_t pmd) in pmd_pte() argument
15 return __pte(pmd_val(pmd)); in pmd_pte()
23 #define pmd_wrprotect(pmd) pte_pmd(pte_wrprotect(pmd_pte(pmd))) argument
24 #define pmd_mkwrite(pmd) pte_pmd(pte_mkwrite(pmd_pte(pmd))) argument
25 #define pmd_mkdirty(pmd) pte_pmd(pte_mkdirty(pmd_pte(pmd))) argument
26 #define pmd_mkold(pmd) pte_pmd(pte_mkold(pmd_pte(pmd))) argument
27 #define pmd_mkyoung(pmd) pte_pmd(pte_mkyoung(pmd_pte(pmd))) argument
28 #define pmd_mkhuge(pmd) pte_pmd(pte_mkhuge(pmd_pte(pmd))) argument
29 #define pmd_mkinvalid(pmd) pte_pmd(pte_mknotpresent(pmd_pte(pmd))) argument
30 #define pmd_mkclean(pmd) pte_pmd(pte_mkclean(pmd_pte(pmd))) argument
[all …]
/Linux-v6.1/arch/arm/include/asm/
Dpgtable-3level.h114 #define pmd_table(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \ argument
116 #define pmd_sect(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \ argument
118 #define pmd_large(pmd) pmd_sect(pmd) argument
119 #define pmd_leaf(pmd) pmd_sect(pmd) argument
138 #define pmd_bad(pmd) (!(pmd_val(pmd) & 2)) argument
174 #define pmd_isset(pmd, val) ((u32)(val) == (val) ? pmd_val(pmd) & (val) \ argument
175 : !!(pmd_val(pmd) & (val)))
176 #define pmd_isclear(pmd, val) (!(pmd_val(pmd) & (val))) argument
178 #define pmd_present(pmd) (pmd_isset((pmd), L_PMD_SECT_VALID)) argument
179 #define pmd_young(pmd) (pmd_isset((pmd), PMD_SECT_AF)) argument
[all …]
/Linux-v6.1/arch/loongarch/include/asm/
Dpgtable.h95 pr_err("%s:%d: bad pmd %016lx.\n", __FILE__, __LINE__, pmd_val(e))
154 typedef struct { unsigned long pmd; } pmd_t; member
155 #define pmd_val(x) ((x).pmd)
196 * Empty pmd entries point to the invalid_pte_table.
198 static inline int pmd_none(pmd_t pmd) in pmd_none() argument
200 return pmd_val(pmd) == (unsigned long)invalid_pte_table; in pmd_none()
203 static inline int pmd_bad(pmd_t pmd) in pmd_bad() argument
205 return (pmd_val(pmd) & ~PAGE_MASK); in pmd_bad()
208 static inline int pmd_present(pmd_t pmd) in pmd_present() argument
210 if (unlikely(pmd_val(pmd) & _PAGE_HUGE)) in pmd_present()
[all …]
/Linux-v6.1/arch/arm64/include/asm/
Dpgtable.h154 #define pmd_access_permitted(pmd, write) \ argument
155 (pte_access_permitted(pmd_pte(pmd), (write)))
171 static inline pmd_t clear_pmd_bit(pmd_t pmd, pgprot_t prot) in clear_pmd_bit() argument
173 pmd_val(pmd) &= ~pgprot_val(prot); in clear_pmd_bit()
174 return pmd; in clear_pmd_bit()
177 static inline pmd_t set_pmd_bit(pmd_t pmd, pgprot_t prot) in set_pmd_bit() argument
179 pmd_val(pmd) |= pgprot_val(prot); in set_pmd_bit()
180 return pmd; in set_pmd_bit()
253 static inline pmd_t pmd_mkcont(pmd_t pmd) in pmd_mkcont() argument
255 return __pmd(pmd_val(pmd) | PMD_SECT_CONT); in pmd_mkcont()
[all …]
/Linux-v6.1/arch/mips/include/asm/
Dpgtable.h65 #define pmd_phys(pmd) virt_to_phys((void *)pmd_val(pmd)) argument
67 static inline unsigned long pmd_pfn(pmd_t pmd) in pmd_pfn() argument
69 return pmd_val(pmd) >> _PFN_SHIFT; in pmd_pfn()
73 #define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT)) argument
76 #define pmd_page_vaddr(pmd) pmd_val(pmd) argument
403 static inline int pmd_write(pmd_t pmd) argument
405 return !!(pmd_val(pmd) & _PAGE_WRITE);
408 static inline struct page *pmd_page(pmd_t pmd) argument
410 if (pmd_val(pmd) & _PAGE_HUGE)
411 return pfn_to_page(pmd_pfn(pmd));
[all …]
/Linux-v6.1/arch/riscv/include/asm/
Dpgtable.h190 static inline int pmd_present(pmd_t pmd) in pmd_present() argument
198 return (pmd_val(pmd) & (_PAGE_PRESENT | _PAGE_PROT_NONE | _PAGE_LEAF)); in pmd_present()
201 static inline int pmd_present(pmd_t pmd) in pmd_present() argument
203 return (pmd_val(pmd) & (_PAGE_PRESENT | _PAGE_PROT_NONE)); in pmd_present()
207 static inline int pmd_none(pmd_t pmd) in pmd_none() argument
209 return (pmd_val(pmd) == 0); in pmd_none()
212 static inline int pmd_bad(pmd_t pmd) in pmd_bad() argument
214 return !pmd_present(pmd) || (pmd_val(pmd) & _PAGE_LEAF); in pmd_bad()
218 static inline int pmd_leaf(pmd_t pmd) in pmd_leaf() argument
220 return pmd_present(pmd) && (pmd_val(pmd) & _PAGE_LEAF); in pmd_leaf()
[all …]
/Linux-v6.1/include/trace/events/
Dthp.h13 TP_PROTO(unsigned long addr, unsigned long pmd),
14 TP_ARGS(addr, pmd),
17 __field(unsigned long, pmd)
22 __entry->pmd = pmd;
25 TP_printk("Set pmd with 0x%lx with 0x%lx", __entry->addr, __entry->pmd)
53 TP_PROTO(unsigned long addr, unsigned long pmd),
55 TP_ARGS(addr, pmd),
59 __field(unsigned long, pmd)
64 __entry->pmd = pmd;
66 TP_printk("addr=%lx, pmd=%lx", __entry->addr, __entry->pmd)
[all …]
/Linux-v6.1/arch/x86/include/asm/
Dpgtable.h28 bool __init __early_make_pgtable(unsigned long address, pmdval_t pmd);
73 #define set_pmd(pmdp, pmd) native_set_pmd(pmdp, pmd) argument
97 #define pmd_clear(pmd) native_pmd_clear(pmd) argument
137 static inline int pmd_dirty(pmd_t pmd) in pmd_dirty() argument
139 return pmd_flags(pmd) & _PAGE_DIRTY; in pmd_dirty()
143 static inline int pmd_young(pmd_t pmd) in pmd_young() argument
145 return pmd_flags(pmd) & _PAGE_ACCESSED; in pmd_young()
194 static inline unsigned long pmd_pfn(pmd_t pmd) in pmd_pfn() argument
196 phys_addr_t pfn = pmd_val(pmd); in pmd_pfn()
198 return (pfn & pmd_pfn_mask(pmd)) >> PAGE_SHIFT; in pmd_pfn()
[all …]
Dpgtable-3level.h18 pr_err("%s:%d: bad pmd %p(%016Lx)\n", \
46 * because GCC will not read the 64-bit value of the pmd atomically.
50 * function to know if the pmd is null or not, and in turn to know if
51 * they can run pte_offset_map_lock() or pmd_trans_huge() or other pmd
54 * Without THP if the mmap_lock is held for reading, the pmd can only
56 * we can always return atomic pmd values with this function.
58 * With THP if the mmap_lock is held for reading, the pmd can become
65 * 'none' (zero) pmdval if the low part of the pmd is zero.
71 * needs the low part of the pmd to be read atomically to decide if the
72 * pmd is unstable or not, with the only exception when the low part
[all …]
/Linux-v6.1/mm/
Ddebug_vm_pgtable.c195 pmd_t pmd; in pmd_basic_tests() local
200 pr_debug("Validating PMD basic (%pGv)\n", ptr); in pmd_basic_tests()
201 pmd = pfn_pmd(args->fixed_pmd_pfn, prot); in pmd_basic_tests()
210 WARN_ON(pmd_dirty(pmd_wrprotect(pmd))); in pmd_basic_tests()
213 WARN_ON(!pmd_same(pmd, pmd)); in pmd_basic_tests()
214 WARN_ON(!pmd_young(pmd_mkyoung(pmd_mkold(pmd)))); in pmd_basic_tests()
215 WARN_ON(!pmd_dirty(pmd_mkdirty(pmd_mkclean(pmd)))); in pmd_basic_tests()
216 WARN_ON(!pmd_write(pmd_mkwrite(pmd_wrprotect(pmd)))); in pmd_basic_tests()
217 WARN_ON(pmd_young(pmd_mkold(pmd_mkyoung(pmd)))); in pmd_basic_tests()
218 WARN_ON(pmd_dirty(pmd_mkclean(pmd_mkdirty(pmd)))); in pmd_basic_tests()
[all …]
Dhuge_memory.c464 * DAX PMD support. in hugepage_init()
554 pmd_t maybe_pmd_mkwrite(pmd_t pmd, struct vm_area_struct *vma) in maybe_pmd_mkwrite() argument
557 pmd = pmd_mkwrite(pmd); in maybe_pmd_mkwrite()
558 return pmd; in maybe_pmd_mkwrite()
684 vmf->ptl = pmd_lock(vma->vm_mm, vmf->pmd); in __do_huge_pmd_anonymous_page()
685 if (unlikely(!pmd_none(*vmf->pmd))) { in __do_huge_pmd_anonymous_page()
708 pgtable_trans_huge_deposit(vma->vm_mm, vmf->pmd, pgtable); in __do_huge_pmd_anonymous_page()
709 set_pmd_at(vma->vm_mm, haddr, vmf->pmd, entry); in __do_huge_pmd_anonymous_page()
710 update_mmu_cache_pmd(vma, vmf->address, vmf->pmd); in __do_huge_pmd_anonymous_page()
766 struct vm_area_struct *vma, unsigned long haddr, pmd_t *pmd, in set_huge_zero_page() argument
[all …]
/Linux-v6.1/arch/x86/mm/
Dpgtable.c61 void ___pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) in ___pmd_free_tlb() argument
63 struct page *page = virt_to_page(pmd); in ___pmd_free_tlb()
64 paravirt_release_pmd(__pa(pmd) >> PAGE_SHIFT); in ___pmd_free_tlb()
126 ptes in non-PAE, or shared PMD in PAE), then just copy the in pgd_ctor()
156 * kernel pmd is shared. If PAE were not to share the pmd a similar
172 * Also, if we're in a paravirt environment where the kernel pmd is
188 void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd) in pud_populate() argument
190 paravirt_alloc_pmd(mm, __pa(pmd) >> PAGE_SHIFT); in pud_populate()
193 reserved at the pmd (PDPT) level. */ in pud_populate()
194 set_pud(pudp, __pud(__pa(pmd) | _PAGE_PRESENT)); in pud_populate()
[all …]
Dinit_64.c75 DEFINE_POPULATE(pud_populate, pud, pmd, init) in DEFINE_POPULATE()
76 DEFINE_POPULATE(pmd_populate_kernel, pmd, pte, init) in DEFINE_POPULATE()
90 DEFINE_ENTRY(pmd, pmd, init)
276 pmd_t *pmd = (pmd_t *) spp_getpage(); in fill_pmd() local
277 pud_populate(&init_mm, pud, pmd); in fill_pmd()
278 if (pmd != pmd_offset(pud, 0)) in fill_pmd()
280 pmd, pmd_offset(pud, 0)); in fill_pmd()
285 static pte_t *fill_pte(pmd_t *pmd, unsigned long vaddr) in fill_pte() argument
287 if (pmd_none(*pmd)) { in fill_pte()
289 pmd_populate_kernel(&init_mm, pmd, pte); in fill_pte()
[all …]
/Linux-v6.1/arch/powerpc/include/asm/book3s/64/
Dpgtable.h46 * We need to mark a pmd pte invalid while splitting. We can do that by clearing
177 /* pmd table use page table fragments */
238 /* Bits to mask out from a PMD to get to the PTE page */
240 /* Bits to mask out from a PUD to get to the PMD page */
713 * This is potentially called with a pmd as the argument, in which case it's not
758 #define __pmd_to_swp_entry(pmd) (__pte_to_swp_entry(pmd_pte(pmd))) argument
915 static inline int pmd_none(pmd_t pmd) in pmd_none() argument
917 return !pmd_raw(pmd); in pmd_none()
920 static inline int pmd_present(pmd_t pmd) in pmd_present() argument
923 * A pmd is considerent present if _PAGE_PRESENT is set. in pmd_present()
[all …]
/Linux-v6.1/mm/kasan/
Dinit.c70 static inline bool kasan_pte_table(pmd_t pmd) in kasan_pte_table() argument
72 return pmd_page(pmd) == virt_to_page(lm_alias(kasan_early_shadow_pte)); in kasan_pte_table()
92 static void __ref zero_pte_populate(pmd_t *pmd, unsigned long addr, in zero_pte_populate() argument
95 pte_t *pte = pte_offset_kernel(pmd, addr); in zero_pte_populate()
105 pte = pte_offset_kernel(pmd, addr); in zero_pte_populate()
112 pmd_t *pmd = pmd_offset(pud, addr); in zero_pmd_populate() local
119 pmd_populate_kernel(&init_mm, pmd, in zero_pmd_populate()
124 if (pmd_none(*pmd)) { in zero_pmd_populate()
134 pmd_populate_kernel(&init_mm, pmd, p); in zero_pmd_populate()
136 zero_pte_populate(pmd, addr, next); in zero_pmd_populate()
[all …]
/Linux-v6.1/arch/parisc/include/asm/
Dpgalloc.h39 /* Three Level Page Table Support for pmd's */
41 static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) in pud_populate() argument
44 (__u32)(__pa((unsigned long)pmd) >> PxD_VALUE_SHIFT))); in pud_populate()
49 pmd_t *pmd; in pmd_alloc_one() local
51 pmd = (pmd_t *)__get_free_pages(GFP_PGTABLE_KERNEL, PMD_TABLE_ORDER); in pmd_alloc_one()
52 if (likely(pmd)) in pmd_alloc_one()
53 memset ((void *)pmd, 0, PAGE_SIZE << PMD_TABLE_ORDER); in pmd_alloc_one()
54 return pmd; in pmd_alloc_one()
57 static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) in pmd_free() argument
59 free_pages((unsigned long)pmd, PMD_TABLE_ORDER); in pmd_free()
[all …]
/Linux-v6.1/arch/arm/mm/
Didmap.c27 pmd_t *pmd; in idmap_add_pmd() local
31 pmd = pmd_alloc_one(&init_mm, addr); in idmap_add_pmd()
32 if (!pmd) { in idmap_add_pmd()
33 pr_warn("Failed to allocate identity pmd.\n"); in idmap_add_pmd()
37 * Copy the original PMD to ensure that the PMD entries for in idmap_add_pmd()
41 memcpy(pmd, pmd_offset(pud, 0), in idmap_add_pmd()
43 pud_populate(&init_mm, pud, pmd); in idmap_add_pmd()
44 pmd += pmd_index(addr); in idmap_add_pmd()
46 pmd = pmd_offset(pud, addr); in idmap_add_pmd()
50 *pmd = __pmd((addr & PMD_MASK) | prot); in idmap_add_pmd()
[all …]
/Linux-v6.1/arch/m68k/include/asm/
Dsun3_pgtable.h93 static inline unsigned long pmd_page_vaddr(pmd_t pmd) in pmd_page_vaddr() argument
95 return (unsigned long)__va(pmd_val(pmd) & PAGE_MASK); in pmd_page_vaddr()
110 #define pmd_pfn(pmd) (pmd_val(pmd) >> PAGE_SHIFT) argument
111 #define pmd_page(pmd) virt_to_page(pmd_page_vaddr(pmd)) argument
114 static inline int pmd_none2 (pmd_t *pmd) { return !pmd_val (*pmd); } in pmd_none2() argument
115 #define pmd_none(pmd) pmd_none2(&(pmd)) argument
116 //static inline int pmd_bad (pmd_t pmd) { return (pmd_val (pmd) & SUN3_PMD_MASK) != SUN3_PMD_MAGIC;…
117 static inline int pmd_bad2 (pmd_t *pmd) { return 0; } in pmd_bad2() argument
118 #define pmd_bad(pmd) pmd_bad2(&(pmd)) argument
119 static inline int pmd_present2 (pmd_t *pmd) { return pmd_val (*pmd) & SUN3_PMD_VALID; } in pmd_present2() argument
[all …]
/Linux-v6.1/arch/s390/include/asm/
Dpgtable.h72 pr_err("%s:%d: bad pmd %016lx.\n", __FILE__, __LINE__, pmd_val(e))
536 static inline pmd_t clear_pmd_bit(pmd_t pmd, pgprot_t prot) in clear_pmd_bit() argument
538 return __pmd(pmd_val(pmd) & ~pgprot_val(prot)); in clear_pmd_bit()
541 static inline pmd_t set_pmd_bit(pmd_t pmd, pgprot_t prot) in set_pmd_bit() argument
543 return __pmd(pmd_val(pmd) | pgprot_val(prot)); in set_pmd_bit()
614 * pgd/p4d/pud/pmd/pte query functions
705 static inline int pmd_large(pmd_t pmd) in pmd_large() argument
707 return (pmd_val(pmd) & _SEGMENT_ENTRY_LARGE) != 0; in pmd_large()
710 static inline int pmd_bad(pmd_t pmd) in pmd_bad() argument
712 if ((pmd_val(pmd) & _SEGMENT_ENTRY_TYPE_MASK) > 0 || pmd_large(pmd)) in pmd_bad()
[all …]
/Linux-v6.1/include/asm-generic/
Dpgtable_uffd.h10 static __always_inline int pmd_uffd_wp(pmd_t pmd) in pmd_uffd_wp() argument
20 static __always_inline pmd_t pmd_mkuffd_wp(pmd_t pmd) in pmd_mkuffd_wp() argument
22 return pmd; in pmd_mkuffd_wp()
30 static __always_inline pmd_t pmd_clear_uffd_wp(pmd_t pmd) in pmd_clear_uffd_wp() argument
32 return pmd; in pmd_clear_uffd_wp()
50 static inline pmd_t pmd_swp_mkuffd_wp(pmd_t pmd) in pmd_swp_mkuffd_wp() argument
52 return pmd; in pmd_swp_mkuffd_wp()
55 static inline int pmd_swp_uffd_wp(pmd_t pmd) in pmd_swp_uffd_wp() argument
60 static inline pmd_t pmd_swp_clear_uffd_wp(pmd_t pmd) in pmd_swp_clear_uffd_wp() argument
62 return pmd; in pmd_swp_clear_uffd_wp()
/Linux-v6.1/include/linux/
Dhuge_mm.h29 unsigned long addr, pmd_t *pmd,
32 pmd_t *pmd, unsigned long addr, unsigned long next);
33 int zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma, pmd_t *pmd,
40 pmd_t *pmd, unsigned long addr, pgprot_t newprot,
46 * vmf_insert_pfn_pmd - insert a pmd size pfn
52 * Insert a pmd size pfn. See vmf_insert_pfn() for additional info.
132 * check that the PMD-aligned addresses in the VMA map to
133 * PMD-aligned offsets within the file, else the hugepage will
134 * not be PMD-mappable.
192 void __split_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd,
[all …]
/Linux-v6.1/arch/s390/mm/
Dvmem.c134 * consecutive sections. Remember for the last added PMD the last in vmemmap_use_new_sub_pmd()
135 * unused range in the populated PMD. in vmemmap_use_new_sub_pmd()
141 /* Returns true if the PMD is completely unused and can be freed. */
152 static int __ref modify_pte_table(pmd_t *pmd, unsigned long addr, in modify_pte_table() argument
163 pte = pte_offset_kernel(pmd, addr); in modify_pte_table()
193 static void try_free_pte_table(pmd_t *pmd, unsigned long start) in try_free_pte_table() argument
199 pte = pte_offset_kernel(pmd, start); in try_free_pte_table()
204 vmem_pte_free((unsigned long *) pmd_deref(*pmd)); in try_free_pte_table()
205 pmd_clear(pmd); in try_free_pte_table()
214 pmd_t *pmd; in modify_pmd_table() local
[all …]
/Linux-v6.1/drivers/soc/bcm/bcm63xx/
Dbcm63xx-power.c39 static int bcm63xx_power_get_state(struct bcm63xx_power_dev *pmd, bool *is_on) in bcm63xx_power_get_state() argument
41 struct bcm63xx_power *power = pmd->power; in bcm63xx_power_get_state()
43 if (!pmd->mask) { in bcm63xx_power_get_state()
48 *is_on = !(__raw_readl(power->base) & pmd->mask); in bcm63xx_power_get_state()
53 static int bcm63xx_power_set_state(struct bcm63xx_power_dev *pmd, bool on) in bcm63xx_power_set_state() argument
55 struct bcm63xx_power *power = pmd->power; in bcm63xx_power_set_state()
59 if (!pmd->mask) in bcm63xx_power_set_state()
65 val &= ~pmd->mask; in bcm63xx_power_set_state()
67 val |= pmd->mask; in bcm63xx_power_set_state()
76 struct bcm63xx_power_dev *pmd = container_of(genpd, in bcm63xx_power_on() local
[all …]

12345678910>>...19