Home
last modified time | relevance | path

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

12345678910>>...26

/linux-6.1.9/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-6.1.9/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()
137 static inline unsigned p2m_index(unsigned long pfn) in p2m_index() argument
139 return pfn % P2M_PER_PAGE; in p2m_index()
174 static void p2m_init_identity(unsigned long *p2m, unsigned long pfn) in p2m_init_identity() argument
179 p2m[i] = IDENTITY_FRAME(pfn + i); in p2m_init_identity()
219 unsigned long pfn, mfn; in xen_build_mfn_list_list() local
[all …]
/linux-6.1.9/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-6.1.9/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.c194 unsigned long pfn = page_to_pfn(page); in lookup_page_ext() local
208 index = pfn - round_down(node_start_pfn(page_to_nid(page)), in lookup_page_ext()
273 unsigned long pfn = page_to_pfn(page); in lookup_page_ext() local
274 struct mem_section *section = __pfn_to_section(pfn); in lookup_page_ext()
286 return get_entry(page_ext, pfn); in lookup_page_ext()
305 static int __meminit init_section_page_ext(unsigned long pfn, int nid) in init_section_page_ext() argument
311 section = __pfn_to_section(pfn); in init_section_page_ext()
335 pfn &= PAGE_SECTION_MASK; in init_section_page_ext()
336 section->page_ext = (void *)base - page_ext_size * pfn; in init_section_page_ext()
357 static void __free_page_ext(unsigned long pfn) in __free_page_ext() argument
[all …]
Dmemory_hotplug.c232 static int check_pfn_span(unsigned long pfn, unsigned long nr_pages) in check_pfn_span() argument
249 if (!IS_ALIGNED(pfn | nr_pages, min_align)) in check_pfn_span()
259 struct page *pfn_to_online_page(unsigned long pfn) in pfn_to_online_page() argument
261 unsigned long nr = pfn_to_section_nr(pfn); in pfn_to_online_page()
276 if (IS_ENABLED(CONFIG_HAVE_ARCH_PFN_VALID) && !pfn_valid(pfn)) in pfn_to_online_page()
279 if (!pfn_section_valid(ms, pfn)) in pfn_to_online_page()
283 return pfn_to_page(pfn); in pfn_to_online_page()
291 pgmap = get_dev_pagemap(pfn, NULL); in pfn_to_online_page()
298 return pfn_to_page(pfn); in pfn_to_online_page()
302 int __ref __add_pages(int nid, unsigned long pfn, unsigned long nr_pages, in __add_pages() argument
[all …]
Dsparse.c185 static void subsection_mask_set(unsigned long *map, unsigned long pfn, in subsection_mask_set() argument
188 int idx = subsection_map_index(pfn); in subsection_mask_set()
189 int end = subsection_map_index(pfn + nr_pages - 1); in subsection_mask_set()
194 void __init subsection_map_init(unsigned long pfn, unsigned long nr_pages) in subsection_map_init() argument
196 int end_sec = pfn_to_section_nr(pfn + nr_pages - 1); in subsection_map_init()
197 unsigned long nr, start_sec = pfn_to_section_nr(pfn); in subsection_map_init()
207 - (pfn & ~PAGE_SECTION_MASK)); in subsection_map_init()
209 subsection_mask_set(ms->usage->subsection_map, pfn, pfns); in subsection_map_init()
212 pfns, subsection_map_index(pfn), in subsection_map_init()
213 subsection_map_index(pfn + pfns - 1)); in subsection_map_init()
[all …]
Dmemory-failure.c258 static int kill_proc(struct to_kill *tk, unsigned long pfn, int flags) in kill_proc() argument
265 pfn, t->comm, t->pid); in kill_proc()
412 unsigned long pfn, int flags) in kill_procs() argument
425 pfn, tk->tsk->comm, tk->tsk->pid); in kill_procs()
436 else if (kill_proc(tk, pfn, flags) < 0) in kill_procs()
438 pfn, tk->tsk->comm, tk->tsk->pid); in kill_procs()
617 unsigned long pfn; member
630 unsigned long pfn = 0; in check_hwpoisoned_entry() local
633 pfn = pte_pfn(pte); in check_hwpoisoned_entry()
638 pfn = swp_offset_pfn(swp); in check_hwpoisoned_entry()
[all …]
Dpage_idle.c34 static struct page *page_idle_get_page(unsigned long pfn) in page_idle_get_page() argument
36 struct page *page = pfn_to_online_page(pfn); in page_idle_get_page()
119 unsigned long pfn, end_pfn; in page_idle_bitmap_read() local
125 pfn = pos * BITS_PER_BYTE; in page_idle_bitmap_read()
126 if (pfn >= max_pfn) in page_idle_bitmap_read()
129 end_pfn = pfn + count * BITS_PER_BYTE; in page_idle_bitmap_read()
133 for (; pfn < end_pfn; pfn++) { in page_idle_bitmap_read()
134 bit = pfn % BITMAP_CHUNK_BITS; in page_idle_bitmap_read()
137 page = page_idle_get_page(pfn); in page_idle_bitmap_read()
164 unsigned long pfn, end_pfn; in page_idle_bitmap_write() local
[all …]
Dcma.c82 static void cma_clear_bitmap(struct cma *cma, unsigned long pfn, in cma_clear_bitmap() argument
88 bitmap_no = (pfn - cma->base_pfn) >> cma->order_per_bit; in cma_clear_bitmap()
98 unsigned long base_pfn = cma->base_pfn, pfn; in cma_activate_area() local
112 for (pfn = base_pfn + 1; pfn < base_pfn + cma->count; pfn++) { in cma_activate_area()
113 WARN_ON_ONCE(!pfn_valid(pfn)); in cma_activate_area()
114 if (page_zone(pfn_to_page(pfn)) != zone) in cma_activate_area()
118 for (pfn = base_pfn; pfn < base_pfn + cma->count; in cma_activate_area()
119 pfn += pageblock_nr_pages) in cma_activate_area()
120 init_cma_reserved_pageblock(pfn_to_page(pfn)); in cma_activate_area()
136 for (pfn = base_pfn; pfn < base_pfn + cma->count; pfn++) in cma_activate_area()
[all …]
Dpage_owner.c279 unsigned long pfn, block_end_pfn; in pagetypeinfo_showmixedcount_print() local
286 pfn = zone->zone_start_pfn; in pagetypeinfo_showmixedcount_print()
293 for (; pfn < end_pfn; ) { in pagetypeinfo_showmixedcount_print()
294 page = pfn_to_online_page(pfn); in pagetypeinfo_showmixedcount_print()
296 pfn = ALIGN(pfn + 1, MAX_ORDER_NR_PAGES); in pagetypeinfo_showmixedcount_print()
300 block_end_pfn = pageblock_end_pfn(pfn); in pagetypeinfo_showmixedcount_print()
305 for (; pfn < block_end_pfn; pfn++) { in pagetypeinfo_showmixedcount_print()
307 page = pfn_to_page(pfn); in pagetypeinfo_showmixedcount_print()
317 pfn += (1UL << freepage_order) - 1; in pagetypeinfo_showmixedcount_print()
339 pfn = block_end_pfn; in pagetypeinfo_showmixedcount_print()
[all …]
/linux-6.1.9/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-6.1.9/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-6.1.9/include/trace/events/
Dcma.h13 TP_PROTO(const char *name, unsigned long pfn, const struct page *page,
16 TP_ARGS(name, pfn, page, count, align),
20 __field(unsigned long, pfn)
28 __entry->pfn = pfn;
36 __entry->pfn,
44 TP_PROTO(const char *name, unsigned long pfn, const struct page *page,
47 TP_ARGS(name, pfn, page, count),
51 __field(unsigned long, pfn)
58 __entry->pfn = pfn;
65 __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-6.1.9/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-6.1.9/arch/arm/mach-omap2/
Dio.c71 .pfn = __phys_to_pfn(L3_24XX_PHYS),
77 .pfn = __phys_to_pfn(L4_24XX_PHYS),
87 .pfn = __phys_to_pfn(DSP_MEM_2420_PHYS),
93 .pfn = __phys_to_pfn(DSP_IPI_2420_PHYS),
99 .pfn = __phys_to_pfn(DSP_MMU_2420_PHYS),
111 .pfn = __phys_to_pfn(L4_WK_243X_PHYS),
117 .pfn = __phys_to_pfn(OMAP243X_GPMC_PHYS),
123 .pfn = __phys_to_pfn(OMAP243X_SDRC_PHYS),
129 .pfn = __phys_to_pfn(OMAP243X_SMS_PHYS),
141 .pfn = __phys_to_pfn(L3_34XX_PHYS),
[all …]
/linux-6.1.9/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-6.1.9/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-6.1.9/arch/arm/mm/
Dioremap.c188 remap_area_sections(unsigned long virt, unsigned long pfn, in remap_area_sections() argument
201 pmd[0] = __pmd(__pfn_to_phys(pfn) | type->prot_sect); in remap_area_sections()
202 pfn += SZ_1M >> PAGE_SHIFT; in remap_area_sections()
203 pmd[1] = __pmd(__pfn_to_phys(pfn) | type->prot_sect); in remap_area_sections()
204 pfn += SZ_1M >> PAGE_SHIFT; in remap_area_sections()
215 remap_area_supersections(unsigned long virt, unsigned long pfn, in remap_area_supersections() argument
229 super_pmd_val = __pfn_to_phys(pfn) | type->prot_sect | in remap_area_supersections()
231 super_pmd_val |= ((pfn >> (32 - PAGE_SHIFT)) & 0xf) << 20; in remap_area_supersections()
242 pfn += SUPERSECTION_SIZE >> PAGE_SHIFT; in remap_area_supersections()
249 static void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn, in __arm_ioremap_pfn_caller() argument
[all …]
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_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn) in flush_cache_page() argument
101 vivt_flush_cache_page(vma, user_addr, pfn); in flush_cache_page()
106 flush_pfn_alias(pfn, user_addr); in flush_cache_page()
115 #define flush_pfn_alias(pfn,vaddr) do { } while (0) argument
116 #define flush_icache_alias(pfn,vaddr,len) do { } while (0) argument
271 unsigned long pfn; in __sync_icache_dcache() local
[all …]
/linux-6.1.9/include/asm-generic/
Dmemory_model.h18 #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET)) argument
25 #define __pfn_to_page(pfn) (vmemmap + (pfn)) argument
39 #define __pfn_to_page(pfn) \ argument
40 ({ unsigned long __pfn = (pfn); \
50 #define __pfn_to_phys(pfn) PFN_PHYS(pfn) argument
/linux-6.1.9/kernel/power/
Dsnapshot.c744 static int memory_bm_find_bit(struct memory_bitmap *bm, unsigned long pfn, in memory_bm_find_bit() argument
753 if (pfn >= zone->start_pfn && pfn < zone->end_pfn) in memory_bm_find_bit()
760 if (pfn >= curr->start_pfn && pfn < curr->end_pfn) { in memory_bm_find_bit()
782 ((pfn - zone->start_pfn) & ~BM_BLOCK_MASK) == bm->cur.node_pfn) in memory_bm_find_bit()
786 block_nr = (pfn - zone->start_pfn) >> BM_BLOCK_SHIFT; in memory_bm_find_bit()
801 bm->cur.node_pfn = (pfn - zone->start_pfn) & ~BM_BLOCK_MASK; in memory_bm_find_bit()
805 *bit_nr = (pfn - zone->start_pfn) & BM_BLOCK_MASK; in memory_bm_find_bit()
810 static void memory_bm_set_bit(struct memory_bitmap *bm, unsigned long pfn) in memory_bm_set_bit() argument
816 error = memory_bm_find_bit(bm, pfn, &addr, &bit); in memory_bm_set_bit()
821 static int mem_bm_set_bit_check(struct memory_bitmap *bm, unsigned long pfn) in mem_bm_set_bit_check() argument
[all …]
/linux-6.1.9/arch/x86/mm/
Dinit_32.c264 unsigned long pfn; in kernel_physical_mapping_init() local
295 pfn = start_pfn; in kernel_physical_mapping_init()
296 pgd_idx = pgd_index((pfn<<PAGE_SHIFT) + PAGE_OFFSET); in kernel_physical_mapping_init()
301 if (pfn >= end_pfn) in kernel_physical_mapping_init()
304 pmd_idx = pmd_index((pfn<<PAGE_SHIFT) + PAGE_OFFSET); in kernel_physical_mapping_init()
309 for (; pmd_idx < PTRS_PER_PMD && pfn < end_pfn; in kernel_physical_mapping_init()
311 unsigned int addr = pfn * PAGE_SIZE + PAGE_OFFSET; in kernel_physical_mapping_init()
328 pfn &= PMD_MASK >> PAGE_SHIFT; in kernel_physical_mapping_init()
329 addr2 = (pfn + PTRS_PER_PTE-1) * PAGE_SIZE + in kernel_physical_mapping_init()
338 set_pmd(pmd, pfn_pmd(pfn, init_prot)); in kernel_physical_mapping_init()
[all …]

12345678910>>...26