/openbmc/linux/arch/x86/include/asm/xen/ |
H A D | page.h | 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); 135 unsigned long mfn; in __pfn_to_mfn() local 138 mfn = xen_p2m_addr[pfn]; in __pfn_to_mfn() 144 if (unlikely(mfn == INVALID_P2M_ENTRY)) in __pfn_to_mfn() 147 return mfn; in __pfn_to_mfn() 158 unsigned long mfn; in pfn_to_mfn() local 168 mfn = __pfn_to_mfn(pfn); in pfn_to_mfn() 170 if (mfn != INVALID_P2M_ENTRY) in pfn_to_mfn() 171 mfn &= ~(FOREIGN_FRAME_BIT | IDENTITY_FRAME_BIT); in pfn_to_mfn() [all …]
|
/openbmc/linux/include/xen/arm/ |
H A D | page.h | 60 unsigned long mfn; in pfn_to_bfn() local 63 mfn = __pfn_to_mfn(pfn); in pfn_to_bfn() 64 if (mfn != INVALID_P2M_ENTRY) in pfn_to_bfn() 65 return mfn; 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 109 return __set_phys_to_machine(pfn, mfn); in set_phys_to_machine()
|
/openbmc/linux/drivers/clk/imx/ |
H A D | clk-pllv1.c | 47 static inline bool mfn_is_negative(struct clk_pllv1 *pll, unsigned int mfn) in mfn_is_negative() argument 49 return !is_imx1_pllv1(pll) && !is_imx21_pllv1(pll) && (mfn & MFN_SIGN); in mfn_is_negative() 58 unsigned int mfi, mfn, mfd, pd; in clk_pllv1_recalc_rate() local 75 mfn = reg & 0x3ff; in clk_pllv1_recalc_rate() 81 mfn_abs = mfn; in clk_pllv1_recalc_rate() 88 if (mfn_is_negative(pll, mfn)) { in clk_pllv1_recalc_rate() 90 mfn_abs = mfn & MFN_MASK; in clk_pllv1_recalc_rate() 92 mfn_abs = BIT(MFN_BITS) - mfn; in clk_pllv1_recalc_rate() 102 if (mfn_is_negative(pll, mfn)) in clk_pllv1_recalc_rate()
|
H A D | clk-pllv4.c | 82 u32 mult, mfn, mfd; in clk_pllv4_recalc_rate() local 89 mfn = readl_relaxed(pll->base + pll->num_offset); in clk_pllv4_recalc_rate() 92 temp64 *= mfn; in clk_pllv4_recalc_rate() 104 u32 mfn, mfd = DEFAULT_MFD; in clk_pllv4_round_rate() local 140 mfn = temp64; in clk_pllv4_round_rate() 148 if (mfn >= mfd) in clk_pllv4_round_rate() 152 temp64 *= mfn; in clk_pllv4_round_rate() 181 u32 val, mult, mfn, mfd = DEFAULT_MFD; in clk_pllv4_set_rate() local 195 mfn = temp64; in clk_pllv4_set_rate() 202 writel_relaxed(mfn, pll->base + pll->num_offset); in clk_pllv4_set_rate()
|
H A D | clk-pllv3.c | 218 u32 mfn = readl_relaxed(pll->base + pll->num_offset); in clk_pllv3_av_recalc_rate() local 223 temp64 *= mfn; in clk_pllv3_av_recalc_rate() 236 u32 mfn, mfd = 1000000; in clk_pllv3_av_round_rate() local 252 mfn = temp64; in clk_pllv3_av_round_rate() 255 temp64 *= mfn; in clk_pllv3_av_round_rate() 268 u32 mfn, mfd = 1000000; in clk_pllv3_av_set_rate() local 282 mfn = temp64; in clk_pllv3_av_set_rate() 288 writel_relaxed(mfn, pll->base + pll->num_offset); in clk_pllv3_av_set_rate() 305 u32 mfn; /* numerator, 30-bit value */ member 315 temp64 *= mf.mfn; in clk_pllv3_vf610_mf_to_rate() [all …]
|
H A D | clk-pllv2.c | 81 long mfi, mfn, mfd, pdf, ref_clk; in __clk_pllv2_recalc_rate() local 91 mfn = dp_mfn & MXC_PLL_DP_MFN_MASK; in __clk_pllv2_recalc_rate() 92 mfn = sign_extend32(mfn, 26); in __clk_pllv2_recalc_rate() 99 temp = (u64) ref_clk * abs(mfn); in __clk_pllv2_recalc_rate() 101 if (mfn < 0) in __clk_pllv2_recalc_rate() 130 long mfi, pdf, mfn, mfd = 999999; in __clk_pllv2_set_rate() local 144 mfn = (long)temp64; in __clk_pllv2_set_rate() 150 *dp_mfn = mfn; in __clk_pllv2_set_rate()
|
H A D | clk-fracn-gppll.c | 50 .mfn = (_mfn), \ 60 .mfn = 0, \ 156 u32 mfi, mfn, mfd, rdiv, odiv; in clk_fracn_gppll_recalc_rate() local 162 mfn = FIELD_GET(PLL_MFN_MASK, pll_numerator); in clk_fracn_gppll_recalc_rate() 180 if (rate_table[i].mfn == mfn && rate_table[i].mfi == mfi && in clk_fracn_gppll_recalc_rate() 209 fvco = fvco * mfi * mfd + fvco * mfn; in clk_fracn_gppll_recalc_rate() 258 writel_relaxed(FIELD_PREP(PLL_MFN_MASK, rate->mfn), pll->base + PLL_NUMERATOR); in clk_fracn_gppll_set_rate() 282 WARN(ana_mfn != rate->mfn, "ana_mfn != rate->mfn\n"); in clk_fracn_gppll_set_rate()
|
/openbmc/linux/arch/arm/xen/ |
H A D | p2m.c | 24 unsigned long mfn; member 59 __func__, &new->pfn, &new->mfn, &entry->pfn, &entry->mfn); in xen_add_phys_to_mach_entry() 76 unsigned long mfn = entry->mfn + (pfn - entry->pfn); in __pfn_to_mfn() local 78 return mfn; in __pfn_to_mfn() 151 unsigned long mfn, unsigned long nr_pages) in __set_phys_to_machine_multi() argument 158 if (mfn == INVALID_P2M_ENTRY) { in __set_phys_to_machine_multi() 185 p2m_entry->mfn = mfn; in __set_phys_to_machine_multi() 199 bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn) in __set_phys_to_machine() argument 201 return __set_phys_to_machine_multi(pfn, mfn, 1); in __set_phys_to_machine()
|
/openbmc/linux/arch/x86/xen/ |
H A D | p2m.c | 216 unsigned long pfn, mfn; in xen_build_mfn_list_list() local 248 mfn = pte_mfn(*ptep); in xen_build_mfn_list_list() 271 mid_mfn_p[mididx] = mfn; in xen_build_mfn_list_list() 312 unsigned long mfn; in xen_p2m_elem_type() local 317 mfn = xen_p2m_addr[pfn]; in xen_p2m_elem_type() 319 if (mfn == INVALID_P2M_ENTRY) in xen_p2m_elem_type() 322 if (mfn & IDENTITY_FRAME_BIT) in xen_p2m_elem_type() 647 bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn) in __set_phys_to_machine() argument 654 return mfn == INVALID_P2M_ENTRY; in __set_phys_to_machine() 660 if (likely(!xen_safe_write_ulong(xen_p2m_addr + pfn, mfn))) in __set_phys_to_machine() [all …]
|
H A D | suspend_pv.c | 16 xen_start_info->console.domU.mfn = in xen_pv_pre_suspend() 17 mfn_to_pfn(xen_start_info->console.domU.mfn); in xen_pv_pre_suspend() 37 xen_start_info->console.domU.mfn = in xen_pv_post_suspend() 38 pfn_to_mfn(xen_start_info->console.domU.mfn); in xen_pv_post_suspend()
|
H A D | setup.c | 200 static int __init xen_free_mfn(unsigned long mfn) in xen_free_mfn() argument 208 set_xen_guest_handle(reservation.extent_start, &mfn); in xen_free_mfn() 229 unsigned long mfn = pfn_to_mfn(pfn); in xen_set_identity_and_release_chunk() local 232 if (mfn == INVALID_P2M_ENTRY || mfn_to_pfn(mfn) != pfn) in xen_set_identity_and_release_chunk() 235 ret = xen_free_mfn(mfn); in xen_set_identity_and_release_chunk() 252 static void __init xen_update_mem_tables(unsigned long pfn, unsigned long mfn) in xen_update_mem_tables() argument 255 .ptr = ((uint64_t)mfn << PAGE_SHIFT) | MMU_MACHPHYS_UPDATE, in xen_update_mem_tables() 260 if (!set_phys_to_machine(pfn, mfn)) { in xen_update_mem_tables() 262 pfn, mfn); in xen_update_mem_tables() 269 mfn, pfn); in xen_update_mem_tables() [all …]
|
H A D | mmu_pv.c | 307 void __init set_pte_mfn(unsigned long vaddr, unsigned long mfn, pgprot_t flags) in set_pte_mfn() argument 309 if (HYPERVISOR_update_va_mapping(vaddr, mfn_pte(mfn, flags), in set_pte_mfn() 380 unsigned long mfn = (val & XEN_PTE_MFN_MASK) >> PAGE_SHIFT; in pte_mfn_to_pfn() local 381 unsigned long pfn = mfn_to_pfn(mfn); in pte_mfn_to_pfn() 398 unsigned long mfn; in pte_pfn_to_mfn() local 400 mfn = __pfn_to_mfn(pfn); in pte_pfn_to_mfn() 408 if (unlikely(mfn == INVALID_P2M_ENTRY)) { in pte_pfn_to_mfn() 409 mfn = 0; in pte_pfn_to_mfn() 412 mfn &= ~(FOREIGN_FRAME_BIT | IDENTITY_FRAME_BIT); in pte_pfn_to_mfn() 413 val = ((pteval_t)mfn << PAGE_SHIFT) | flags; in pte_pfn_to_mfn() [all …]
|
H A D | enlighten_pv.c | 166 var[reg].base_lo |= op.u.read_memtype.mfn << PAGE_SHIFT; in xen_set_mtrr_data() 167 var[reg].base_hi = op.u.read_memtype.mfn >> (32 - PAGE_SHIFT); in xen_set_mtrr_data() 508 unsigned long pfn, mfn; in xen_load_gdt() local 528 mfn = pfn_to_mfn(pfn); in xen_load_gdt() 534 if (HYPERVISOR_set_gdt(&mfn, size / sizeof(struct desc_struct))) in xen_load_gdt() 545 unsigned long pfn, mfn; in xen_load_gdt_boot() local 553 mfn = pfn_to_mfn(pfn); in xen_load_gdt_boot() 560 if (HYPERVISOR_set_gdt(&mfn, size / sizeof(struct desc_struct))) in xen_load_gdt_boot() 1475 xen_start_info->console.domU.mfn = 0; in xen_start_kernel()
|
H A D | mmu.h | 16 bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn);
|
/openbmc/u-boot/arch/arm/mach-imx/mx5/ |
H A D | clock.c | 63 u32 mfn; member 162 uint32_t ctrl, op, mfd, mfn, mfi, pdf, ret; in decode_pll() local 169 mfn = readl(&pll->hfs_mfn); in decode_pll() 173 mfn = readl(&pll->mfn); in decode_pll() 179 mfn &= MXC_DPLLC_MFN_MFN_MASK; in decode_pll() 188 if (mfn >= 0x04000000) { in decode_pll() 189 mfn |= 0xfc000000; in decode_pll() 190 mfn_abs = -mfn; in decode_pll() 192 mfn_abs = mfn; in decode_pll() 203 if ((int)mfn < 0) in decode_pll() [all …]
|
/openbmc/linux/arch/powerpc/boot/ |
H A D | mpc8xx.c | 24 int mfi, mfn, mfd, pdf; in mpc885_get_clock() local 44 mfn = (plprcr >> 27) & 0x1f; in mpc885_get_clock() 48 if (mfn != 0) in mpc885_get_clock() 49 ret += crystal * mfn / (mfd + 1); in mpc885_get_clock()
|
/openbmc/u-boot/arch/arm/cpu/arm920t/imx/ |
H A D | speed.c | 28 u32 mfn = spctl0 & 0x3f; in get_systemPLLCLK() local 34 return (2*(CONFIG_SYSPLL_CLK_FREQ>>10)*( (mfi<<10) + (mfn<<10)/(mfd+1)))/(pd+1); in get_systemPLLCLK() 42 u32 mfn = mpctl0 & 0x3f; in get_mcuPLLCLK() local 48 return (2*(CONFIG_SYS_CLK_FREQ>>10)*( (mfi<<10) + (mfn<<10)/(mfd+1)))/(pd+1); in get_mcuPLLCLK()
|
/openbmc/qemu/hw/misc/ |
H A D | imx_ccm.c | 51 int32_t mfn = MFN(pllreg); /* Numerator */ in imx_ccm_calc_pll() local 61 mfn <<= 32 - 10; in imx_ccm_calc_pll() 62 mfn >>= 32 - 10; in imx_ccm_calc_pll() 64 freq = ((2 * (base_freq >> 10) * (mfi * mfd + mfn)) / in imx_ccm_calc_pll()
|
/openbmc/u-boot/arch/arm/cpu/arm1136/mx31/ |
H A D | generic.c | 17 s32 mfn = GET_PLL_MFN(reg); in mx31_decode_pll() local 22 mfn = mfn >= 512 ? mfn - 1024 : mfn; in mx31_decode_pll() 26 return lldiv(2 * (u64)infreq * (mfi * mfd + mfn), in mx31_decode_pll()
|
/openbmc/u-boot/arch/arm/cpu/arm926ejs/mx25/ |
H A D | generic.c | 36 int mfn = (pll >> CCM_PLL_MFN_SHIFT) in imx_decode_pll() local 44 mfn = mfn >= 512 ? mfn - 1024 : mfn; in imx_decode_pll() 48 return lldiv(2 * (u64) f_ref * (mfi * mfd + mfn), in imx_decode_pll()
|
/openbmc/linux/drivers/gpu/drm/i915/gvt/ |
H A D | trace.h | 43 TP_PROTO(int id, void *spt, int type, unsigned long mfn, 46 TP_ARGS(id, spt, type, mfn, gpt_gfn), 52 __field(unsigned long, mfn) 60 __entry->mfn = mfn; 68 __entry->mfn,
|
/openbmc/u-boot/arch/arm/cpu/arm1136/mx35/ |
H A D | generic.c | 117 s32 mfn = reg & 0x3ff; in decode_pll() local 122 mfn = mfn >= 512 ? mfn - 1024 : mfn; in decode_pll() 126 return lldiv(2 * (u64)infreq * (mfi * mfd + mfn), in decode_pll()
|
/openbmc/linux/include/xen/ |
H A D | xen-ops.h | 151 unsigned long addr, xen_pfn_t *mfn, in xen_remap_domain_mfn_array() argument 158 return xen_remap_pfn(vma, addr, mfn, nr, err_ptr, prot, domid, in xen_remap_domain_mfn_array()
|
/openbmc/qemu/include/hw/xen/interface/ |
H A D | xen.h | 433 xen_pfn_t mfn; member 838 xen_pfn_t mfn; /* MACHINE page number of console page. */ member 864 #define console_mfn console.domU.mfn
|
/openbmc/linux/include/xen/interface/ |
H A D | xen.h | 346 xen_pfn_t mfn; member 630 xen_pfn_t mfn; /* MACHINE page number of console page. */ member
|