Home
last modified time | relevance | path

Searched refs:pfn (Results 1 – 25 of 596) sorted by relevance

12345678910>>...24

/Linux-v6.6/include/linux/
Dpfn_t.h29 static inline pfn_t __pfn_to_pfn_t(unsigned long pfn, u64 flags) in __pfn_to_pfn_t() argument
31 pfn_t pfn_t = { .val = pfn | (flags & PFN_FLAGS_MASK), }; in __pfn_to_pfn_t()
37 static inline pfn_t pfn_to_pfn_t(unsigned long pfn) in pfn_to_pfn_t() argument
39 return __pfn_to_pfn_t(pfn, 0); in pfn_to_pfn_t()
47 static inline bool pfn_t_has_page(pfn_t pfn) in pfn_t_has_page() argument
49 return (pfn.val & PFN_MAP) == PFN_MAP || (pfn.val & PFN_DEV) == 0; in pfn_t_has_page()
52 static inline unsigned long pfn_t_to_pfn(pfn_t pfn) in pfn_t_to_pfn() argument
54 return pfn.val & ~PFN_FLAGS_MASK; in pfn_t_to_pfn()
57 static inline struct page *pfn_t_to_page(pfn_t pfn) in pfn_t_to_page() argument
59 if (pfn_t_has_page(pfn)) in pfn_t_to_page()
[all …]
Dpageblock-flags.h56 #define pageblock_align(pfn) ALIGN((pfn), pageblock_nr_pages) argument
57 #define pageblock_aligned(pfn) IS_ALIGNED((pfn), pageblock_nr_pages) argument
58 #define pageblock_start_pfn(pfn) ALIGN_DOWN((pfn), pageblock_nr_pages) argument
59 #define pageblock_end_pfn(pfn) ALIGN((pfn) + 1, pageblock_nr_pages) argument
65 unsigned long pfn,
70 unsigned long pfn,
/Linux-v6.6/arch/x86/xen/
Dp2m.c126 static inline unsigned p2m_top_index(unsigned long pfn) in p2m_top_index() argument
128 BUG_ON(pfn >= MAX_P2M_PFN); in p2m_top_index()
129 return pfn / (P2M_MID_PER_PAGE * P2M_PER_PAGE); in p2m_top_index()
132 static inline unsigned p2m_mid_index(unsigned long pfn) in p2m_mid_index() argument
134 return (pfn / P2M_PER_PAGE) % P2M_MID_PER_PAGE; in p2m_mid_index()
169 static void p2m_init_identity(unsigned long *p2m, unsigned long pfn) in p2m_init_identity() argument
174 p2m[i] = IDENTITY_FRAME(pfn + i); in p2m_init_identity()
214 unsigned long pfn, mfn; in xen_build_mfn_list_list() local
237 for (pfn = 0; pfn < xen_max_p2m_pfn && pfn < MAX_P2M_PFN; in xen_build_mfn_list_list()
238 pfn += P2M_PER_PAGE) { in xen_build_mfn_list_list()
[all …]
/Linux-v6.6/arch/x86/include/asm/xen/
Dpage.h56 extern int xen_alloc_p2m_entry(unsigned long pfn);
58 extern unsigned long get_phys_to_machine(unsigned long pfn);
59 extern bool set_phys_to_machine(unsigned long pfn, unsigned long mfn);
60 extern bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn);
133 static inline unsigned long __pfn_to_mfn(unsigned long pfn) in __pfn_to_mfn() argument
137 if (pfn < xen_p2m_size) in __pfn_to_mfn()
138 mfn = xen_p2m_addr[pfn]; in __pfn_to_mfn()
139 else if (unlikely(pfn < xen_max_p2m_pfn)) in __pfn_to_mfn()
140 return get_phys_to_machine(pfn); in __pfn_to_mfn()
142 return IDENTITY_FRAME(pfn); in __pfn_to_mfn()
[all …]
/Linux-v6.6/mm/
Dpage_isolation.c38 unsigned long pfn; in has_unmovable_pages() local
55 for (pfn = start_pfn; pfn < end_pfn; pfn++) { in has_unmovable_pages()
56 page = pfn_to_page(pfn); in has_unmovable_pages()
93 pfn += skip_pages - 1; in has_unmovable_pages()
105 pfn += (1 << buddy_order(page)) - 1; in has_unmovable_pages()
267 __first_valid_page(unsigned long pfn, unsigned long nr_pages) in __first_valid_page() argument
274 page = pfn_to_online_page(pfn + i); in __first_valid_page()
311 unsigned long pfn; in isolate_single_pageblock() local
364 for (pfn = start_pfn; pfn < boundary_pfn;) { in isolate_single_pageblock()
365 struct page *page = __first_valid_page(pfn, boundary_pfn - pfn); in isolate_single_pageblock()
[all …]
Dpage_ext.c157 unsigned long pfn = page_to_pfn(page); in lookup_page_ext() local
171 index = pfn - round_down(node_start_pfn(page_to_nid(page)), in lookup_page_ext()
236 unsigned long pfn = page_to_pfn(page); in lookup_page_ext() local
237 struct mem_section *section = __pfn_to_section(pfn); in lookup_page_ext()
249 return get_entry(page_ext, pfn); in lookup_page_ext()
268 static int __meminit init_section_page_ext(unsigned long pfn, int nid) in init_section_page_ext() argument
274 section = __pfn_to_section(pfn); in init_section_page_ext()
298 pfn &= PAGE_SECTION_MASK; in init_section_page_ext()
299 section->page_ext = (void *)base - page_ext_size * pfn; in init_section_page_ext()
320 static void __free_page_ext(unsigned long pfn) in __free_page_ext() argument
[all …]
Dmemory_hotplug.c297 static int check_pfn_span(unsigned long pfn, unsigned long nr_pages) in check_pfn_span() argument
314 if (!IS_ALIGNED(pfn | nr_pages, min_align)) in check_pfn_span()
324 struct page *pfn_to_online_page(unsigned long pfn) in pfn_to_online_page() argument
326 unsigned long nr = pfn_to_section_nr(pfn); in pfn_to_online_page()
341 if (IS_ENABLED(CONFIG_HAVE_ARCH_PFN_VALID) && !pfn_valid(pfn)) in pfn_to_online_page()
344 if (!pfn_section_valid(ms, pfn)) in pfn_to_online_page()
348 return pfn_to_page(pfn); in pfn_to_online_page()
356 pgmap = get_dev_pagemap(pfn, NULL); in pfn_to_online_page()
363 return pfn_to_page(pfn); in pfn_to_online_page()
367 int __ref __add_pages(int nid, unsigned long pfn, unsigned long nr_pages, in __add_pages() argument
[all …]
Dsparse.c184 static void subsection_mask_set(unsigned long *map, unsigned long pfn, in subsection_mask_set() argument
187 int idx = subsection_map_index(pfn); in subsection_mask_set()
188 int end = subsection_map_index(pfn + nr_pages - 1); in subsection_mask_set()
193 void __init subsection_map_init(unsigned long pfn, unsigned long nr_pages) in subsection_map_init() argument
195 int end_sec = pfn_to_section_nr(pfn + nr_pages - 1); in subsection_map_init()
196 unsigned long nr, start_sec = pfn_to_section_nr(pfn); in subsection_map_init()
206 - (pfn & ~PAGE_SECTION_MASK)); in subsection_map_init()
208 subsection_mask_set(ms->usage->subsection_map, pfn, pfns); in subsection_map_init()
211 pfns, subsection_map_index(pfn), in subsection_map_init()
212 subsection_map_index(pfn + pfns - 1)); in subsection_map_init()
[all …]
Dmemory-failure.c77 void num_poisoned_pages_inc(unsigned long pfn) in num_poisoned_pages_inc() argument
80 memblk_nr_poison_inc(pfn); in num_poisoned_pages_inc()
83 void num_poisoned_pages_sub(unsigned long pfn, long i) in num_poisoned_pages_sub() argument
86 if (pfn != -1UL) in num_poisoned_pages_sub()
87 memblk_nr_poison_sub(pfn, i); in num_poisoned_pages_sub()
328 static int kill_proc(struct to_kill *tk, unsigned long pfn, int flags) in kill_proc() argument
335 pfn, t->comm, t->pid); in kill_proc()
511 unsigned long pfn, int flags) in kill_procs() argument
524 pfn, tk->tsk->comm, tk->tsk->pid); in kill_procs()
535 else if (kill_proc(tk, pfn, flags) < 0) in kill_procs()
[all …]
Dcma.c83 static void cma_clear_bitmap(struct cma *cma, unsigned long pfn, in cma_clear_bitmap() argument
89 bitmap_no = (pfn - cma->base_pfn) >> cma->order_per_bit; in cma_clear_bitmap()
99 unsigned long base_pfn = cma->base_pfn, pfn; in cma_activate_area() local
113 for (pfn = base_pfn + 1; pfn < base_pfn + cma->count; pfn++) { in cma_activate_area()
114 WARN_ON_ONCE(!pfn_valid(pfn)); in cma_activate_area()
115 if (page_zone(pfn_to_page(pfn)) != zone) in cma_activate_area()
119 for (pfn = base_pfn; pfn < base_pfn + cma->count; in cma_activate_area()
120 pfn += pageblock_nr_pages) in cma_activate_area()
121 init_cma_reserved_pageblock(pfn_to_page(pfn)); in cma_activate_area()
137 for (pfn = base_pfn; pfn < base_pfn + cma->count; pfn++) in cma_activate_area()
[all …]
Dpage_idle.c34 static struct folio *page_idle_get_folio(unsigned long pfn) in page_idle_get_folio() argument
36 struct page *page = pfn_to_online_page(pfn); in page_idle_get_folio()
120 unsigned long pfn, end_pfn; in page_idle_bitmap_read() local
126 pfn = pos * BITS_PER_BYTE; in page_idle_bitmap_read()
127 if (pfn >= max_pfn) in page_idle_bitmap_read()
130 end_pfn = pfn + count * BITS_PER_BYTE; in page_idle_bitmap_read()
134 for (; pfn < end_pfn; pfn++) { in page_idle_bitmap_read()
135 bit = pfn % BITMAP_CHUNK_BITS; in page_idle_bitmap_read()
138 folio = page_idle_get_folio(pfn); in page_idle_bitmap_read()
165 unsigned long pfn, end_pfn; in page_idle_bitmap_write() local
[all …]
Dpage_owner.c281 unsigned long pfn, block_end_pfn; in pagetypeinfo_showmixedcount_print() local
288 pfn = zone->zone_start_pfn; in pagetypeinfo_showmixedcount_print()
295 for (; pfn < end_pfn; ) { in pagetypeinfo_showmixedcount_print()
296 page = pfn_to_online_page(pfn); in pagetypeinfo_showmixedcount_print()
298 pfn = ALIGN(pfn + 1, MAX_ORDER_NR_PAGES); in pagetypeinfo_showmixedcount_print()
302 block_end_pfn = pageblock_end_pfn(pfn); in pagetypeinfo_showmixedcount_print()
307 for (; pfn < block_end_pfn; pfn++) { in pagetypeinfo_showmixedcount_print()
309 page = pfn_to_page(pfn); in pagetypeinfo_showmixedcount_print()
319 pfn += (1UL << freepage_order) - 1; in pagetypeinfo_showmixedcount_print()
341 pfn = block_end_pfn; in pagetypeinfo_showmixedcount_print()
[all …]
/Linux-v6.6/tools/testing/scatterlist/
Dmain.c11 unsigned *pfn; member
28 #define pfn(...) (unsigned []){ __VA_ARGS__ } macro
42 printf(" %x", test->pfn[i]); in fail()
56 { -EINVAL, 1, pfn(0), NULL, PAGE_SIZE, 0, 1 }, in main()
57 { 0, 1, pfn(0), NULL, PAGE_SIZE, PAGE_SIZE + 1, 1 }, in main()
58 { 0, 1, pfn(0), NULL, PAGE_SIZE, sgmax, 1 }, in main()
59 { 0, 1, pfn(0), NULL, 1, sgmax, 1 }, in main()
60 { 0, 2, pfn(0, 1), NULL, 2 * PAGE_SIZE, sgmax, 1 }, in main()
61 { 0, 2, pfn(1, 0), NULL, 2 * PAGE_SIZE, sgmax, 2 }, in main()
62 { 0, 3, pfn(0, 1, 2), NULL, 3 * PAGE_SIZE, sgmax, 1 }, in main()
[all …]
/Linux-v6.6/include/trace/events/
Dksm.h132 TP_PROTO(unsigned long pfn, void *rmap_item, void *mm, int err),
134 TP_ARGS(pfn, rmap_item, mm, err),
137 __field(unsigned long, pfn)
144 __entry->pfn = pfn;
151 __entry->pfn, __entry->rmap_item, __entry->mm, __entry->err)
167 TP_PROTO(void *ksm_page, unsigned long pfn, void *rmap_item, void *mm, int err),
169 TP_ARGS(ksm_page, pfn, rmap_item, mm, err),
173 __field(unsigned long, pfn)
181 __entry->pfn = pfn;
189 __entry->pfn, __entry->rmap_item, __entry->mm, __entry->err)
[all …]
Dcma.h13 TP_PROTO(const char *name, unsigned long pfn, const struct page *page,
16 TP_ARGS(name, pfn, page, count),
20 __field(unsigned long, pfn)
27 __entry->pfn = pfn;
34 __entry->pfn,
65 TP_PROTO(const char *name, unsigned long pfn, const struct page *page,
68 TP_ARGS(name, pfn, page, count, align, errorno),
72 __field(unsigned long, pfn)
81 __entry->pfn = pfn;
90 __entry->pfn,
[all …]
Dkmem.h143 __field( unsigned long, pfn )
148 __entry->pfn = page_to_pfn(page);
153 pfn_to_page(__entry->pfn),
154 __entry->pfn,
165 __field( unsigned long, pfn )
169 __entry->pfn = page_to_pfn(page);
173 pfn_to_page(__entry->pfn),
174 __entry->pfn)
185 __field( unsigned long, pfn )
192 __entry->pfn = page ? page_to_pfn(page) : -1UL;
[all …]
/Linux-v6.6/arch/arm/xen/
Dp2m.c23 unsigned long pfn; member
44 if (new->pfn == entry->pfn) in xen_add_phys_to_mach_entry()
47 if (new->pfn < entry->pfn) in xen_add_phys_to_mach_entry()
59 __func__, &new->pfn, &new->mfn, &entry->pfn, &entry->mfn); in xen_add_phys_to_mach_entry()
64 unsigned long __pfn_to_mfn(unsigned long pfn) in __pfn_to_mfn() argument
74 if (entry->pfn <= pfn && in __pfn_to_mfn()
75 entry->pfn + entry->nr_pages > pfn) { in __pfn_to_mfn()
76 unsigned long mfn = entry->mfn + (pfn - entry->pfn); in __pfn_to_mfn()
80 if (pfn < entry->pfn) in __pfn_to_mfn()
150 bool __set_phys_to_machine_multi(unsigned long pfn, in __set_phys_to_machine_multi() argument
[all …]
/Linux-v6.6/scripts/gdb/linux/
Dpage_owner.py56 pfn = int(argv[1])
57 self.read_page_owner_by_addr(self.p_ops.pfn_to_page(pfn))
80 pfn = self.p_ops.page_to_pfn(page)
81 section = self.p_ops.pfn_to_section(pfn)
85 return self.get_entry(page_ext, pfn)
100 pfn = self.p_ops.page_to_pfn(page)
102 if pfn < self.min_pfn or pfn > self.max_pfn or (not self.p_ops.pfn_valid(pfn)):
106 page = self.p_ops.pfn_to_page(pfn)
131 gdb.write("PFN: %d, Flags: 0x%x\n" % (pfn, page['flags']))
148 pfn = self.min_pfn
[all …]
/Linux-v6.6/drivers/gpu/drm/i915/selftests/
Dscatterlist.c48 unsigned long pfn, n; in expect_pfn_sg() local
50 pfn = pt->start; in expect_pfn_sg()
55 if (page_to_pfn(page) != pfn) { in expect_pfn_sg()
57 __func__, who, pfn, page_to_pfn(page)); in expect_pfn_sg()
70 pfn += npages; in expect_pfn_sg()
72 if (pfn != pt->end) { in expect_pfn_sg()
74 __func__, who, pt->end, pfn); in expect_pfn_sg()
86 unsigned long pfn; in expect_pfn_sg_page_iter() local
88 pfn = pt->start; in expect_pfn_sg_page_iter()
92 if (page != pfn_to_page(pfn)) { in expect_pfn_sg_page_iter()
[all …]
/Linux-v6.6/include/asm-generic/
Dmemory_model.h18 #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET)) argument
23 static inline int pfn_valid(unsigned long pfn) in pfn_valid() argument
29 return pfn >= pfn_offset && (pfn - pfn_offset) < max_mapnr; in pfn_valid()
37 #define __pfn_to_page(pfn) (vmemmap + (pfn)) argument
51 #define __pfn_to_page(pfn) \ argument
52 ({ unsigned long __pfn = (pfn); \
62 #define __pfn_to_phys(pfn) PFN_PHYS(pfn) argument
/Linux-v6.6/arch/arm/mach-omap2/
Dio.c68 .pfn = __phys_to_pfn(L3_24XX_PHYS),
74 .pfn = __phys_to_pfn(L4_24XX_PHYS),
84 .pfn = __phys_to_pfn(DSP_MEM_2420_PHYS),
90 .pfn = __phys_to_pfn(DSP_IPI_2420_PHYS),
96 .pfn = __phys_to_pfn(DSP_MMU_2420_PHYS),
108 .pfn = __phys_to_pfn(L4_WK_243X_PHYS),
114 .pfn = __phys_to_pfn(OMAP243X_GPMC_PHYS),
120 .pfn = __phys_to_pfn(OMAP243X_SDRC_PHYS),
126 .pfn = __phys_to_pfn(OMAP243X_SMS_PHYS),
138 .pfn = __phys_to_pfn(L3_34XX_PHYS),
[all …]
/Linux-v6.6/include/xen/arm/
Dpage.h15 #define phys_to_machine_mapping_valid(pfn) (1) argument
43 unsigned long __pfn_to_mfn(unsigned long pfn);
47 static inline unsigned long pfn_to_gfn(unsigned long pfn) in pfn_to_gfn() argument
49 return pfn; in pfn_to_gfn()
58 static inline unsigned long pfn_to_bfn(unsigned long pfn) in pfn_to_bfn() argument
63 mfn = __pfn_to_mfn(pfn); in pfn_to_bfn()
68 return pfn; in pfn_to_bfn()
103 bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn);
104 bool __set_phys_to_machine_multi(unsigned long pfn, unsigned long mfn,
107 static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn) in set_phys_to_machine() argument
[all …]
/Linux-v6.6/arch/arm/mm/
Dflush.c38 static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr) in flush_pfn_alias() argument
43 set_top_pte(to, pfn_pte(pfn, PAGE_KERNEL)); in flush_pfn_alias()
52 static void flush_icache_alias(unsigned long pfn, unsigned long vaddr, unsigned long len) in flush_icache_alias() argument
58 set_top_pte(va, pfn_pte(pfn, PAGE_KERNEL)); in flush_icache_alias()
98 void flush_cache_pages(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn, unsi… in flush_cache_pages() argument
101 vivt_flush_cache_pages(vma, user_addr, pfn, nr); in flush_cache_pages()
106 flush_pfn_alias(pfn, user_addr); in flush_cache_pages()
115 #define flush_pfn_alias(pfn,vaddr) do { } while (0) argument
116 #define flush_icache_alias(pfn,vaddr,len) do { } while (0) argument
255 unsigned long start, offset, pfn; in __flush_dcache_aliases() local
[all …]
/Linux-v6.6/arch/riscv/include/asm/
Dpgalloc.h21 unsigned long pfn = virt_to_pfn(pte); in pmd_populate_kernel() local
23 set_pmd(pmd, __pmd((pfn << _PAGE_PFN_SHIFT) | _PAGE_TABLE)); in pmd_populate_kernel()
29 unsigned long pfn = virt_to_pfn(page_address(pte)); in pmd_populate() local
31 set_pmd(pmd, __pmd((pfn << _PAGE_PFN_SHIFT) | _PAGE_TABLE)); in pmd_populate()
37 unsigned long pfn = virt_to_pfn(pmd); in pud_populate() local
39 set_pud(pud, __pud((pfn << _PAGE_PFN_SHIFT) | _PAGE_TABLE)); in pud_populate()
45 unsigned long pfn = virt_to_pfn(pud); in p4d_populate() local
47 set_p4d(p4d, __p4d((pfn << _PAGE_PFN_SHIFT) | _PAGE_TABLE)); in p4d_populate()
55 unsigned long pfn = virt_to_pfn(pud); in p4d_populate_safe() local
58 __p4d((pfn << _PAGE_PFN_SHIFT) | _PAGE_TABLE)); in p4d_populate_safe()
[all …]
/Linux-v6.6/kernel/power/
Dsnapshot.c746 static int memory_bm_find_bit(struct memory_bitmap *bm, unsigned long pfn, in memory_bm_find_bit() argument
755 if (pfn >= zone->start_pfn && pfn < zone->end_pfn) in memory_bm_find_bit()
762 if (pfn >= curr->start_pfn && pfn < curr->end_pfn) { in memory_bm_find_bit()
784 ((pfn - zone->start_pfn) & ~BM_BLOCK_MASK) == bm->cur.node_pfn) in memory_bm_find_bit()
788 block_nr = (pfn - zone->start_pfn) >> BM_BLOCK_SHIFT; in memory_bm_find_bit()
803 bm->cur.node_pfn = (pfn - zone->start_pfn) & ~BM_BLOCK_MASK; in memory_bm_find_bit()
804 bm->cur.cur_pfn = pfn; in memory_bm_find_bit()
808 *bit_nr = (pfn - zone->start_pfn) & BM_BLOCK_MASK; in memory_bm_find_bit()
813 static void memory_bm_set_bit(struct memory_bitmap *bm, unsigned long pfn) in memory_bm_set_bit() argument
819 error = memory_bm_find_bit(bm, pfn, &addr, &bit); in memory_bm_set_bit()
[all …]

12345678910>>...24