Lines Matching defs:pfn

125 unsigned long __ref xen_chk_extra_mem(unsigned long pfn)
130 if (pfn >= xen_extra_mem[i].start_pfn &&
131 pfn < xen_extra_mem[i].start_pfn + xen_extra_mem[i].n_pfns)
135 return IDENTITY_FRAME(pfn);
143 unsigned long pfn, pfn_s, pfn_e;
151 for (pfn = pfn_s; pfn < pfn_e; pfn++)
152 set_phys_to_machine(pfn, INVALID_P2M_ENTRY);
157 * Finds the next RAM pfn available in the E820 map after min_pfn.
158 * This function updates min_pfn with the pfn found and returns
218 unsigned long pfn, end;
225 for (pfn = start_pfn; pfn < end; pfn++) {
226 unsigned long mfn = pfn_to_mfn(pfn);
228 /* Make sure pfn exists to start with */
229 if (mfn == INVALID_P2M_ENTRY || mfn_to_pfn(mfn) != pfn)
233 WARN(ret != 1, "Failed to release pfn %lx err=%d\n", pfn, ret);
237 if (!__set_phys_to_machine(pfn, INVALID_P2M_ENTRY))
249 static void __init xen_update_mem_tables(unsigned long pfn, unsigned long mfn)
253 .val = pfn
257 if (!set_phys_to_machine(pfn, mfn)) {
258 WARN(1, "Failed to set p2m mapping for pfn=%ld mfn=%ld\n",
259 pfn, mfn);
265 WARN(1, "Failed to set m2p mapping for mfn=%ld pfn=%ld\n",
266 mfn, pfn);
270 if (HYPERVISOR_update_va_mapping((unsigned long)__va(pfn << PAGE_SHIFT),
272 WARN(1, "Failed to update kernel mapping for mfn=%ld pfn=%ld\n",
273 mfn, pfn);
309 /* Map first pfn to xen_remap_buf */
334 * This function takes a contiguous pfn range that needs to be identity mapped
348 unsigned long pfn;
372 pr_warn("Unable to find available pfn range, not remapping identity pages\n");
392 for (pfn = start_pfn; pfn <= max_pfn_mapped && pfn < end_pfn; pfn++)
394 (unsigned long)__va(pfn << PAGE_SHIFT),
451 * The remap information (which mfn remap to which pfn) is contained in the
459 unsigned long mfn_save, pfn;
473 pfn = xen_remap_buf.target_pfn;
475 xen_update_mem_tables(pfn, xen_remap_buf.mfns[i]);
477 pfn++;
479 if (pfn_s == ~0UL || pfn == pfn_s) {