/kernel/linux/linux-5.10/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); 133 * - pfn_to_mfn() returns either INVALID_P2M_ENTRY or the mfn. No indicator 143 unsigned long mfn; in __pfn_to_mfn() local 146 mfn = xen_p2m_addr[pfn]; in __pfn_to_mfn() 152 if (unlikely(mfn == INVALID_P2M_ENTRY)) in __pfn_to_mfn() 155 return mfn; in __pfn_to_mfn() 166 unsigned long mfn; in pfn_to_mfn() local 176 mfn = __pfn_to_mfn(pfn); in pfn_to_mfn() 178 if (mfn ! in pfn_to_mfn() 192 mfn_to_pfn_no_overrides(unsigned long mfn) mfn_to_pfn_no_overrides() argument 212 mfn_to_pfn(unsigned long mfn) mfn_to_pfn() argument 291 bfn_to_local_pfn(unsigned long mfn) bfn_to_local_pfn() argument [all...] |
/kernel/linux/linux-6.6/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); 125 * - pfn_to_mfn() returns either INVALID_P2M_ENTRY or the mfn. No indicator 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 ! in pfn_to_mfn() 184 mfn_to_pfn_no_overrides(unsigned long mfn) mfn_to_pfn_no_overrides() argument 204 mfn_to_pfn(unsigned long mfn) mfn_to_pfn() argument 283 bfn_to_local_pfn(unsigned long mfn) bfn_to_local_pfn() argument [all...] |
/kernel/linux/linux-5.10/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()
|
/kernel/linux/linux-6.6/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()
|
/kernel/linux/linux-5.10/drivers/clk/imx/ |
H A D | clk-pllv1.c | 48 static inline bool mfn_is_negative(struct clk_pllv1 *pll, unsigned int mfn) in mfn_is_negative() argument 50 return !is_imx1_pllv1(pll) && !is_imx21_pllv1(pll) && (mfn & MFN_SIGN); in mfn_is_negative() 59 unsigned int mfi, mfn, mfd, pd; in clk_pllv1_recalc_rate() local 70 * mfi + mfn / (mfd + 1) in clk_pllv1_recalc_rate() 76 mfn = reg & 0x3ff; in clk_pllv1_recalc_rate() 82 mfn_abs = mfn; in clk_pllv1_recalc_rate() 85 * On all i.MXs except i.MX1 and i.MX21 mfn is a 10bit in clk_pllv1_recalc_rate() 89 if (mfn_is_negative(pll, mfn)) { in clk_pllv1_recalc_rate() 91 mfn_abs = mfn & MFN_MASK; in clk_pllv1_recalc_rate() 93 mfn_abs = BIT(MFN_BITS) - mfn; in clk_pllv1_recalc_rate() [all...] |
H A D | clk-pllv4.c | 72 u32 mult, mfn, mfd; in clk_pllv4_recalc_rate() local 79 mfn = readl_relaxed(pll->base + PLL_NUM_OFFSET); in clk_pllv4_recalc_rate() 82 temp64 *= mfn; in clk_pllv4_recalc_rate() 93 u32 mfn, mfd = DEFAULT_MFD; in clk_pllv4_round_rate() local 117 mfn = temp64; in clk_pllv4_round_rate() 122 * pair of mfn/mfd, we simply return the round_rate without using in clk_pllv4_round_rate() 125 if (mfn >= mfd) in clk_pllv4_round_rate() 129 temp64 *= mfn; in clk_pllv4_round_rate() 152 u32 val, mult, mfn, mfd = DEFAULT_MFD; in clk_pllv4_set_rate() local 166 mfn in clk_pllv4_set_rate() [all...] |
H A D | clk-pllv3.c | 217 u32 mfn = readl_relaxed(pll->base + pll->num_offset); in clk_pllv3_av_recalc_rate() local 222 temp64 *= mfn; in clk_pllv3_av_recalc_rate() 235 u32 mfn, mfd = 1000000; in clk_pllv3_av_round_rate() local 251 mfn = temp64; in clk_pllv3_av_round_rate() 254 temp64 *= mfn; in clk_pllv3_av_round_rate() 267 u32 mfn, mfd = 1000000; in clk_pllv3_av_set_rate() local 281 mfn = temp64; in clk_pllv3_av_set_rate() 287 writel_relaxed(mfn, pll->base + pll->num_offset); in clk_pllv3_av_set_rate() 304 u32 mfn; /* numerator, 30-bit value */ member 305 u32 mfd; /* denominator, 30-bit value, must be less than mfn */ [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()
|
/kernel/linux/linux-6.6/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 69 * mfi + mfn / (mfd + 1) in clk_pllv1_recalc_rate() 75 mfn = reg & 0x3ff; in clk_pllv1_recalc_rate() 81 mfn_abs = mfn; in clk_pllv1_recalc_rate() 84 * On all i.MXs except i.MX1 and i.MX21 mfn is a 10bit 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() [all...] |
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() 145 * pair of mfn/mfd, we simply return the round_rate without using 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 in clk_pllv4_set_rate() [all...] |
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 306 u32 mfd; /* denominator, 30-bit value, must be less than mfn */ [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() 257 writel_relaxed(FIELD_PREP(PLL_MFN_MASK, rate->mfn), pll->base + PLL_NUMERATOR); in clk_fracn_gppll_set_rate() 279 WARN(ana_mfn != rate->mfn, "ana_mfn != rate->mfn\ in clk_fracn_gppll_set_rate() [all...] |
/kernel/linux/linux-5.10/arch/arm/xen/ |
H A D | p2m.c | 23 unsigned long mfn; member 57 pr_warn("%s: cannot add pfn=%pa -> mfn=%pa: pfn=%pa -> mfn=%pa already exists\n", in xen_add_phys_to_mach_entry() 58 __func__, &new->pfn, &new->mfn, &entry->pfn, &entry->mfn); in xen_add_phys_to_mach_entry() 75 unsigned long mfn = entry->mfn + (pfn - entry->pfn); in __pfn_to_mfn() local 77 return mfn; in __pfn_to_mfn() 152 unsigned long mfn, unsigned long nr_pages) in __set_phys_to_machine_multi() 159 if (mfn in __set_phys_to_machine_multi() 151 __set_phys_to_machine_multi(unsigned long pfn, unsigned long mfn, unsigned long nr_pages) __set_phys_to_machine_multi() argument 200 __set_phys_to_machine(unsigned long pfn, unsigned long mfn) __set_phys_to_machine() argument [all...] |
/kernel/linux/linux-6.6/arch/arm/xen/ |
H A D | p2m.c | 24 unsigned long mfn; member 58 pr_warn("%s: cannot add pfn=%pa -> mfn=%pa: pfn=%pa -> mfn=%pa already exists\n", in xen_add_phys_to_mach_entry() 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() 158 if (mfn in __set_phys_to_machine_multi() 150 __set_phys_to_machine_multi(unsigned long pfn, unsigned long mfn, unsigned long nr_pages) __set_phys_to_machine_multi() argument 199 __set_phys_to_machine(unsigned long pfn, unsigned long mfn) __set_phys_to_machine() argument [all...] |
/kernel/linux/linux-5.10/arch/x86/xen/ |
H A D | p2m.c | 26 * P2M_PER_PAGE depends on the architecture, as a mfn is always 214 * - After resume we're called from within stop_machine, but the mfn 219 unsigned long pfn, mfn; in xen_build_mfn_list_list() local 238 /* Reinitialise, mfn's all change after migration */ in xen_build_mfn_list_list() 251 mfn = pte_mfn(*ptep); in xen_build_mfn_list_list() 254 /* Don't bother allocating any mfn mid levels if in xen_build_mfn_list_list() 255 * they're just missing, just update the stored mfn, in xen_build_mfn_list_list() 274 mid_mfn_p[mididx] = mfn; in xen_build_mfn_list_list() 315 unsigned long mfn; in xen_p2m_elem_type() local 320 mfn in xen_p2m_elem_type() 650 __set_phys_to_machine(unsigned long pfn, unsigned long mfn) __set_phys_to_machine() argument 678 set_phys_to_machine(unsigned long pfn, unsigned long mfn) set_phys_to_machine() argument 711 unsigned long mfn, pfn; set_foreign_p2m_mapping() local 788 unsigned long mfn = __pfn_to_mfn(page_to_pfn(pages[i])); clear_foreign_p2m_mapping() local [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 | 236 static int __init xen_free_mfn(unsigned long mfn) in xen_free_mfn() argument 244 set_xen_guest_handle(reservation.extent_start, &mfn); in xen_free_mfn() 265 unsigned long mfn = pfn_to_mfn(pfn); in xen_set_identity_and_release_chunk() local 268 if (mfn == INVALID_P2M_ENTRY || mfn_to_pfn(mfn) != pfn) in xen_set_identity_and_release_chunk() 271 ret = xen_free_mfn(mfn); in xen_set_identity_and_release_chunk() 288 static void __init xen_update_mem_tables(unsigned long pfn, unsigned long mfn) in xen_update_mem_tables() argument 291 .ptr = ((uint64_t)mfn << PAGE_SHIFT) | MMU_MACHPHYS_UPDATE, in xen_update_mem_tables() 296 if (!set_phys_to_machine(pfn, mfn)) { in xen_update_mem_tables() 297 WARN(1, "Failed to set p2m mapping for pfn=%ld mfn in xen_update_mem_tables() 337 unsigned long mfn_save, mfn; xen_do_set_identity_and_remap_chunk() local [all...] |
/kernel/linux/linux-6.6/arch/x86/xen/ |
H A D | p2m.c | 26 * P2M_PER_PAGE depends on the architecture, as a mfn is always 209 * - After resume we're called from within stop_machine, but the mfn 214 unsigned long pfn, mfn; in xen_build_mfn_list_list() local 233 /* Reinitialise, mfn's all change after migration */ in xen_build_mfn_list_list() 246 mfn = pte_mfn(*ptep); in xen_build_mfn_list_list() 249 /* Don't bother allocating any mfn mid levels if in xen_build_mfn_list_list() 250 * they're just missing, just update the stored mfn, in xen_build_mfn_list_list() 269 mid_mfn_p[mididx] = mfn; in xen_build_mfn_list_list() 310 unsigned long mfn; in xen_p2m_elem_type() local 315 mfn in xen_p2m_elem_type() 645 __set_phys_to_machine(unsigned long pfn, unsigned long mfn) __set_phys_to_machine() argument 673 set_phys_to_machine(unsigned long pfn, unsigned long mfn) set_phys_to_machine() argument 706 unsigned long mfn, pfn; set_foreign_p2m_mapping() local 782 unsigned long mfn = __pfn_to_mfn(page_to_pfn(pages[i])); clear_foreign_p2m_mapping() local [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 | 241 static int __init xen_free_mfn(unsigned long mfn) in xen_free_mfn() argument 249 set_xen_guest_handle(reservation.extent_start, &mfn); in xen_free_mfn() 270 unsigned long mfn = pfn_to_mfn(pfn); in xen_set_identity_and_release_chunk() local 273 if (mfn == INVALID_P2M_ENTRY || mfn_to_pfn(mfn) != pfn) in xen_set_identity_and_release_chunk() 276 ret = xen_free_mfn(mfn); in xen_set_identity_and_release_chunk() 293 static void __init xen_update_mem_tables(unsigned long pfn, unsigned long mfn) in xen_update_mem_tables() argument 296 .ptr = ((uint64_t)mfn << PAGE_SHIFT) | MMU_MACHPHYS_UPDATE, in xen_update_mem_tables() 301 if (!set_phys_to_machine(pfn, mfn)) { in xen_update_mem_tables() 302 WARN(1, "Failed to set p2m mapping for pfn=%ld mfn in xen_update_mem_tables() 338 unsigned long mfn_save, mfn; xen_do_set_identity_and_remap_chunk() local [all...] |
/kernel/linux/linux-5.10/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()
|
/kernel/linux/linux-6.6/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()
|
/kernel/linux/linux-5.10/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; 64 TP_printk("VM%d [alloc] spt %p type %d mfn 0x%lx gfn 0x%lx\n", 68 __entry->mfn,
|
/kernel/linux/linux-6.6/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; 64 TP_printk("VM%d [alloc] spt %p type %d mfn 0x%lx gfn 0x%lx\n", 68 __entry->mfn,
|