Home
last modified time | relevance | path

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

12345678910>>...15

/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);
141 static inline unsigned long __pfn_to_mfn(unsigned long pfn) in __pfn_to_mfn() argument
145 if (pfn < xen_p2m_size) in __pfn_to_mfn()
146 mfn = xen_p2m_addr[pfn]; in __pfn_to_mfn()
147 else if (unlikely(pfn < xen_max_p2m_pfn)) in __pfn_to_mfn()
148 return get_phys_to_machine(pfn); in __pfn_to_mfn()
150 return IDENTITY_FRAME(pfn); in __pfn_to_mfn()
[all …]
/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 …]
Dsetup.c164 unsigned long __ref xen_chk_extra_mem(unsigned long pfn) in xen_chk_extra_mem() argument
169 if (pfn >= xen_extra_mem[i].start_pfn && in xen_chk_extra_mem()
170 pfn < xen_extra_mem[i].start_pfn + xen_extra_mem[i].n_pfns) in xen_chk_extra_mem()
174 return IDENTITY_FRAME(pfn); in xen_chk_extra_mem()
182 unsigned long pfn, pfn_s, pfn_e; in xen_inv_extra_mem() local
190 for (pfn = pfn_s; pfn < pfn_e; pfn++) in xen_inv_extra_mem()
191 set_phys_to_machine(pfn, INVALID_P2M_ENTRY); in xen_inv_extra_mem()
257 unsigned long pfn, end; in xen_set_identity_and_release_chunk() local
264 for (pfn = start_pfn; pfn < end; pfn++) { in xen_set_identity_and_release_chunk()
265 unsigned long mfn = pfn_to_mfn(pfn); in xen_set_identity_and_release_chunk()
[all …]
/arch/arm/xen/
Dp2m.c22 unsigned long pfn; member
43 if (new->pfn == entry->pfn) in xen_add_phys_to_mach_entry()
46 if (new->pfn < entry->pfn) in xen_add_phys_to_mach_entry()
58 __func__, &new->pfn, &new->mfn, &entry->pfn, &entry->mfn); in xen_add_phys_to_mach_entry()
63 unsigned long __pfn_to_mfn(unsigned long pfn) in __pfn_to_mfn() argument
73 if (entry->pfn <= pfn && in __pfn_to_mfn()
74 entry->pfn + entry->nr_pages > pfn) { in __pfn_to_mfn()
75 unsigned long mfn = entry->mfn + (pfn - entry->pfn); in __pfn_to_mfn()
79 if (pfn < entry->pfn) in __pfn_to_mfn()
151 bool __set_phys_to_machine_multi(unsigned long pfn, in __set_phys_to_machine_multi() argument
[all …]
/arch/alpha/include/asm/
Dmmzone.h33 #define node_localnr(pfn, nid) ((pfn) - NODE_DATA(nid)->node_start_pfn) argument
79 unsigned long pfn; \
81 pfn = page_to_pfn(page) << 32; \
82 pte_val(pte) = pfn | pgprot_val(pgprot); \
101 #define pfn_to_nid(pfn) pa_to_nid(((u64)(pfn) << PAGE_SHIFT)) argument
102 #define pfn_valid(pfn) \ argument
103 (((pfn) - node_start_pfn(pfn_to_nid(pfn))) < \
104 node_spanned_pages(pfn_to_nid(pfn))) \
/arch/arm/include/asm/
Ddma-direct.h12 static inline dma_addr_t pfn_to_dma(struct device *dev, unsigned long pfn) in pfn_to_dma() argument
15 pfn = PFN_DOWN(translate_phys_to_dma(dev, PFN_PHYS(pfn))); in pfn_to_dma()
16 return (dma_addr_t)__pfn_to_bus(pfn); in pfn_to_dma()
21 unsigned long pfn = __bus_to_pfn(addr); in dma_to_pfn() local
24 pfn = PFN_DOWN(translate_dma_to_phys(dev, PFN_PHYS(pfn))); in dma_to_pfn()
25 return pfn; in dma_to_pfn()
/arch/arc/include/asm/
Dmmzone.h14 static inline int pfn_to_nid(unsigned long pfn) in pfn_to_nid() argument
19 is_end_low = pfn <= virt_to_pfn(0xFFFFFFFFUL); in pfn_to_nid()
26 if (pfn >= ARCH_PFN_OFFSET && is_end_low) in pfn_to_nid()
32 static inline int pfn_valid(unsigned long pfn) in pfn_valid() argument
34 int nid = pfn_to_nid(pfn); in pfn_valid()
36 return (pfn <= node_end_pfn(nid)); in pfn_valid()
/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 …]
/arch/ia64/include/asm/
Dpage.h99 extern int ia64_pfn_valid (unsigned long pfn);
101 # define ia64_pfn_valid(pfn) 1 argument
108 # define pfn_to_page(pfn) (vmem_map + (pfn)) argument
109 # define __pfn_to_phys(pfn) PFN_PHYS(pfn) argument
118 # define pfn_valid(pfn) (((pfn) < max_mapnr) && ia64_pfn_valid(pfn)) argument
122 # define pfn_valid(pfn) (((pfn) >= min_low_pfn) && ((pfn) < max_low_pfn) && ia64_pfn_valid(pfn)) argument
127 #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) argument
/arch/x86/kernel/
Dcrash_dump_64.c14 static ssize_t __copy_oldmem_page(unsigned long pfn, char *buf, size_t csize, in __copy_oldmem_page() argument
24 vaddr = (__force void *)ioremap_encrypted(pfn << PAGE_SHIFT, PAGE_SIZE); in __copy_oldmem_page()
26 vaddr = (__force void *)ioremap_cache(pfn << PAGE_SHIFT, PAGE_SIZE); in __copy_oldmem_page()
57 ssize_t copy_oldmem_page(unsigned long pfn, char *buf, size_t csize, in copy_oldmem_page() argument
60 return __copy_oldmem_page(pfn, buf, csize, offset, userbuf, false); in copy_oldmem_page()
68 ssize_t copy_oldmem_page_encrypted(unsigned long pfn, char *buf, size_t csize, in copy_oldmem_page_encrypted() argument
71 return __copy_oldmem_page(pfn, buf, csize, offset, userbuf, true); in copy_oldmem_page_encrypted()
Dcrash_dump_32.c18 static inline bool is_crashed_pfn_valid(unsigned long pfn) in is_crashed_pfn_valid() argument
28 return pte_pfn(pfn_pte(pfn, __pgprot(0))) == pfn; in is_crashed_pfn_valid()
51 ssize_t copy_oldmem_page(unsigned long pfn, char *buf, in copy_oldmem_page() argument
59 if (!is_crashed_pfn_valid(pfn)) in copy_oldmem_page()
62 vaddr = kmap_atomic_pfn(pfn); in copy_oldmem_page()
/arch/arm64/mm/
Dmmap.c46 int valid_mmap_phys_addr_range(unsigned long pfn, size_t size) in valid_mmap_phys_addr_range() argument
48 return !(((pfn << PAGE_SHIFT) + size) & ~PHYS_MASK); in valid_mmap_phys_addr_range()
61 int devmem_is_allowed(unsigned long pfn) in devmem_is_allowed() argument
63 if (iomem_is_exclusive(pfn << PAGE_SHIFT)) in devmem_is_allowed()
65 if (!page_is_ram(pfn)) in devmem_is_allowed()
/arch/arm/mm/
Dfault-armv.c37 unsigned long pfn, pte_t *ptep) in do_adjust_pte() argument
52 flush_cache_page(vma, address, pfn); in do_adjust_pte()
53 outer_flush_range((pfn << PAGE_SHIFT), in do_adjust_pte()
54 (pfn << PAGE_SHIFT) + PAGE_SIZE); in do_adjust_pte()
89 unsigned long pfn) in adjust_pte() argument
124 ret = do_adjust_pte(vma, address, pfn, pte); in adjust_pte()
134 unsigned long addr, pte_t *ptep, unsigned long pfn) in make_coherent() argument
161 aliases += adjust_pte(mpnt, mpnt->vm_start + offset, pfn); in make_coherent()
165 do_adjust_pte(vma, addr, pfn, ptep); in make_coherent()
184 unsigned long pfn = pte_pfn(*ptep); in update_mmu_cache() local
[all …]
Dioremap.c183 remap_area_sections(unsigned long virt, unsigned long pfn, in remap_area_sections() argument
196 pmd[0] = __pmd(__pfn_to_phys(pfn) | type->prot_sect); in remap_area_sections()
197 pfn += SZ_1M >> PAGE_SHIFT; in remap_area_sections()
198 pmd[1] = __pmd(__pfn_to_phys(pfn) | type->prot_sect); in remap_area_sections()
199 pfn += SZ_1M >> PAGE_SHIFT; in remap_area_sections()
210 remap_area_supersections(unsigned long virt, unsigned long pfn, in remap_area_supersections() argument
224 super_pmd_val = __pfn_to_phys(pfn) | type->prot_sect | in remap_area_supersections()
226 super_pmd_val |= ((pfn >> (32 - PAGE_SHIFT)) & 0xf) << 20; in remap_area_supersections()
237 pfn += SUPERSECTION_SIZE >> PAGE_SHIFT; in remap_area_supersections()
244 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 …]
/arch/sh/include/asm/
Dmmzone.h11 static inline int pfn_to_nid(unsigned long pfn) in pfn_to_nid() argument
16 if (pfn >= node_start_pfn(nid) && pfn <= node_end_pfn(nid)) in pfn_to_nid()
22 static inline struct pglist_data *pfn_to_pgdat(unsigned long pfn) in pfn_to_pgdat() argument
24 return NODE_DATA(pfn_to_nid(pfn)); in pfn_to_pgdat()
/arch/m68k/include/asm/
Dpage_no.h24 #define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) argument
29 #define pfn_to_page(pfn) virt_to_page(pfn_to_virt(pfn)) argument
31 #define pfn_valid(pfn) ((pfn) < max_mapnr) argument
/arch/x86/include/asm/
Dpgalloc.h20 static inline void paravirt_alloc_pte(struct mm_struct *mm, unsigned long pfn) {} in paravirt_alloc_pte() argument
21 static inline void paravirt_alloc_pmd(struct mm_struct *mm, unsigned long pfn) {} in paravirt_alloc_pmd() argument
22 static inline void paravirt_alloc_pmd_clone(unsigned long pfn, unsigned long clonepfn, in paravirt_alloc_pmd_clone() argument
24 static inline void paravirt_alloc_pud(struct mm_struct *mm, unsigned long pfn) {} in paravirt_alloc_pud() argument
25 static inline void paravirt_alloc_p4d(struct mm_struct *mm, unsigned long pfn) {} in paravirt_alloc_p4d() argument
26 static inline void paravirt_release_pte(unsigned long pfn) {} in paravirt_release_pte() argument
27 static inline void paravirt_release_pmd(unsigned long pfn) {} in paravirt_release_pmd() argument
28 static inline void paravirt_release_pud(unsigned long pfn) {} in paravirt_release_pud() argument
29 static inline void paravirt_release_p4d(unsigned long pfn) {} in paravirt_release_p4d() argument
81 unsigned long pfn = page_to_pfn(pte); in pmd_populate() local
[all …]
/arch/riscv/include/asm/
Dpgalloc.h19 unsigned long pfn = virt_to_pfn(pte); in pmd_populate_kernel() local
21 set_pmd(pmd, __pmd((pfn << _PAGE_PFN_SHIFT) | _PAGE_TABLE)); in pmd_populate_kernel()
27 unsigned long pfn = virt_to_pfn(page_address(pte)); in pmd_populate() local
29 set_pmd(pmd, __pmd((pfn << _PAGE_PFN_SHIFT) | _PAGE_TABLE)); in pmd_populate()
35 unsigned long pfn = virt_to_pfn(pmd); in pud_populate() local
37 set_pud(pud, __pud((pfn << _PAGE_PFN_SHIFT) | _PAGE_TABLE)); in pud_populate()
/arch/microblaze/include/asm/
Dpage.h137 extern int page_is_ram(unsigned long pfn);
140 # define pfn_to_phys(pfn) (PFN_PHYS(pfn)) argument
143 # define pfn_to_virt(pfn) __va(pfn_to_phys((pfn))) argument
160 # define pfn_valid(pfn) (((pfn) >= min_low_pfn) && \ argument
161 ((pfn) <= (min_low_pfn + max_mapnr)))
165 # define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && \ argument
166 (pfn) < (max_mapnr + ARCH_PFN_OFFSET))
/arch/x86/mm/
Dinit_32.c268 unsigned long pfn; in kernel_physical_mapping_init() local
299 pfn = start_pfn; in kernel_physical_mapping_init()
300 pgd_idx = pgd_index((pfn<<PAGE_SHIFT) + PAGE_OFFSET); in kernel_physical_mapping_init()
305 if (pfn >= end_pfn) in kernel_physical_mapping_init()
308 pmd_idx = pmd_index((pfn<<PAGE_SHIFT) + PAGE_OFFSET); in kernel_physical_mapping_init()
313 for (; pmd_idx < PTRS_PER_PMD && pfn < end_pfn; in kernel_physical_mapping_init()
315 unsigned int addr = pfn * PAGE_SIZE + PAGE_OFFSET; in kernel_physical_mapping_init()
332 pfn &= PMD_MASK >> PAGE_SHIFT; in kernel_physical_mapping_init()
333 addr2 = (pfn + PTRS_PER_PTE-1) * PAGE_SIZE + in kernel_physical_mapping_init()
342 set_pmd(pmd, pfn_pmd(pfn, init_prot)); in kernel_physical_mapping_init()
[all …]
/arch/x86/power/
Dhibernate_32.c83 unsigned long pfn; in resume_physical_mapping_init() local
91 pfn = 0; in resume_physical_mapping_init()
98 if (pfn >= max_low_pfn) in resume_physical_mapping_init()
102 if (pfn >= max_low_pfn) in resume_physical_mapping_init()
110 set_pmd(pmd, pfn_pmd(pfn, PAGE_KERNEL_LARGE_EXEC)); in resume_physical_mapping_init()
111 pfn += PTRS_PER_PTE; in resume_physical_mapping_init()
120 for (; pte < max_pte; pte++, pfn++) { in resume_physical_mapping_init()
121 if (pfn >= max_low_pfn) in resume_physical_mapping_init()
124 set_pte(pte, pfn_pte(pfn, PAGE_KERNEL_EXEC)); in resume_physical_mapping_init()
/arch/mips/include/asm/
Dpgtable-32.h160 pfn_pte(unsigned long pfn, pgprot_t prot) in pfn_pte() argument
164 pte.pte_low = (pfn >> _PAGE_PRESENT_SHIFT) | in pfn_pte()
166 pte.pte_high = (pfn << _PFN_SHIFT) | in pfn_pte()
176 static inline pte_t pfn_pte(unsigned long pfn, pgprot_t prot) in pfn_pte() argument
180 pte.pte_high = (pfn << 6) | (pgprot_val(prot) & 0x3f); in pfn_pte()
191 #define pfn_pte(pfn, prot) __pte(((pfn) << (PAGE_SHIFT + 2)) | pgprot_val(prot)) argument
194 #define pfn_pte(pfn, prot) __pte(((unsigned long long)(pfn) << _PFN_SHIFT) | pgprot_val(prot)) argument
195 #define pfn_pmd(pfn, prot) __pmd(((unsigned long long)(pfn) << _PFN_SHIFT) | pgprot_val(prot)) argument
/arch/arm/mach-omap1/
Dio.c31 .pfn = __phys_to_pfn(OMAP1_IO_PHYS),
41 .pfn = __phys_to_pfn(OMAP7XX_DSP_START),
46 .pfn = __phys_to_pfn(OMAP7XX_DSPREG_START),
57 .pfn = __phys_to_pfn(OMAP1510_DSP_START),
62 .pfn = __phys_to_pfn(OMAP1510_DSPREG_START),
73 .pfn = __phys_to_pfn(OMAP16XX_DSP_START),
78 .pfn = __phys_to_pfn(OMAP16XX_DSPREG_START),
/arch/powerpc/kvm/
De500_mmu_host.c164 kvm_pfn_t pfn; in kvmppc_map_magic() local
166 pfn = (kvm_pfn_t)virt_to_phys((void *)shared_page) >> PAGE_SHIFT; in kvmppc_map_magic()
167 get_page(pfn_to_page(pfn)); in kvmppc_map_magic()
175 magic.mas7_3 = ((u64)pfn << PAGE_SHIFT) | in kvmppc_map_magic()
247 kvm_pfn_t pfn, unsigned int wimg) in kvmppc_e500_ref_setup() argument
249 ref->pfn = pfn; in kvmppc_e500_ref_setup()
256 kvm_set_pfn_accessed(pfn); in kvmppc_e500_ref_setup()
259 kvm_set_pfn_dirty(pfn); in kvmppc_e500_ref_setup()
266 trace_kvm_booke206_ref_release(ref->pfn, ref->flags); in kvmppc_e500_ref_release()
310 kvm_pfn_t pfn = ref->pfn; in kvmppc_e500_setup_stlbe() local
[all …]

12345678910>>...15