/openbmc/linux/tools/testing/selftests/powerpc/pmu/sampling_tests/ |
H A D | misc.h | 96 static inline int get_mmcr1_pmcxsel(u64 mmcr1, int pmc) in get_mmcr1_pmcxsel() argument 98 return ((mmcr1 >> ((24 - (((pmc) - 1) * 8))) & 0xff)); in get_mmcr1_pmcxsel() 101 static inline int get_mmcr1_unit(u64 mmcr1, int pmc) in get_mmcr1_unit() argument 103 return ((mmcr1 >> ((60 - (4 * ((pmc) - 1))))) & 0xf); in get_mmcr1_unit() 106 static inline int get_mmcr1_comb(u64 mmcr1, int pmc) in get_mmcr1_comb() argument 108 return ((mmcr1 >> (38 - ((pmc - 1) * 2))) & 0x3); in get_mmcr1_comb() 111 static inline int get_mmcr1_cache(u64 mmcr1, int pmc) in get_mmcr1_cache() argument 113 return ((mmcr1 >> 46) & 0x3); in get_mmcr1_cache() 116 static inline int get_mmcr1_rsq(u64 mmcr1, int pmc) in get_mmcr1_rsq() argument 118 return mmcr1 & MMCR1_RSQ; in get_mmcr1_rsq()
|
/openbmc/linux/arch/powerpc/perf/ |
H A D | power6-pmu.c | 179 unsigned long mmcr1 = 0; in p6_compute_mmcr() local 217 if ((ttmset & (1 << b)) && MMCR1_TTMSEL(mmcr1, b) != u) in p6_compute_mmcr() 219 mmcr1 |= (unsigned long)u << MMCR1_TTMSEL_SH(b); in p6_compute_mmcr() 225 MMCR1_NESTSEL(mmcr1) != s) in p6_compute_mmcr() 228 mmcr1 |= (unsigned long)s << MMCR1_NESTSEL_SH; in p6_compute_mmcr() 233 mmcr1 |= MMCR1_PMC1_ADDR_SEL >> pmc; in p6_compute_mmcr() 240 mmcr1 |= MMCR1_PMC1_LLA >> pmc; in p6_compute_mmcr() 242 mmcr1 |= MMCR1_PMC1_LLA_VALUE >> pmc; in p6_compute_mmcr() 247 mmcr1 |= (unsigned long)psel << MMCR1_PMCSEL_SH(pmc); in p6_compute_mmcr() 254 mmcr->mmcr1 = mmcr1; in p6_compute_mmcr() [all …]
|
H A D | ppc970-pmu.c | 262 unsigned long mmcr0 = 0, mmcr1 = 0, mmcra = 0; in p970_compute_mmcr() local 323 mmcr1 |= (unsigned long)(ttm & ~4) << MMCR1_TTM1SEL_SH; in p970_compute_mmcr() 341 mmcr1 |= 1ull << (MMCR1_TTM3SEL_SH + 3 - byte); in p970_compute_mmcr() 343 mmcr1 |= (unsigned long)ttm in p970_compute_mmcr() 378 mmcr1 |= 1ull << mmcr1_adder_bits[pmc]; in p970_compute_mmcr() 383 mmcr1 |= spcsel; in p970_compute_mmcr() 390 mmcr1 |= (unsigned long)pmcsel[pmc] in p970_compute_mmcr() 401 mmcr->mmcr1 = mmcr1; in p970_compute_mmcr() 418 mmcr->mmcr1 = (mmcr->mmcr1 & ~(0x1fUL << shift)) | (0x08UL << shift); in p970_disable_pmc()
|
H A D | power5-pmu.c | 388 unsigned long mmcr1 = 0; in power5_compute_mmcr() local 460 mmcr1 |= (unsigned long)i << MMCR1_TTM0SEL_SH; in power5_compute_mmcr() 468 mmcr1 |= (unsigned long)(i & 3) << MMCR1_TTM1SEL_SH; in power5_compute_mmcr() 483 mmcr1 |= 1ul << (MMCR1_TTM3SEL_SH + 3 - byte); in power5_compute_mmcr() 486 mmcr1 |= (unsigned long)ttm in power5_compute_mmcr() 517 mmcr1 |= 1ul << (MMCR1_PMC1_ADDER_SEL_SH - pmc); in power5_compute_mmcr() 525 mmcr1 |= (unsigned long)grsel << grsel_shift[bit]; in power5_compute_mmcr() 530 mmcr1 |= psel << MMCR1_PMCSEL_SH(pmc); in power5_compute_mmcr() 540 mmcr->mmcr1 = mmcr1; in power5_compute_mmcr() 548 mmcr->mmcr1 &= ~(0x7fUL << MMCR1_PMCSEL_SH(pmc)); in power5_disable_pmc()
|
H A D | power5+-pmu.c | 457 unsigned long mmcr1 = 0; in power5p_compute_mmcr() local 520 mmcr1 |= (unsigned long)i << MMCR1_TTM0SEL_SH; in power5p_compute_mmcr() 528 mmcr1 |= (unsigned long)(i & 3) << MMCR1_TTM1SEL_SH; in power5p_compute_mmcr() 543 mmcr1 |= 1ul << (MMCR1_TTM3SEL_SH + 3 - byte); in power5p_compute_mmcr() 546 mmcr1 |= (unsigned long)ttm in power5p_compute_mmcr() 572 mmcr1 |= 1ul << (MMCR1_PMC1_ADDER_SEL_SH - pmc); in power5p_compute_mmcr() 580 mmcr1 |= (unsigned long)grsel << grsel_shift[bit]; in power5p_compute_mmcr() 588 mmcr1 |= psel << MMCR1_PMCSEL_SH(pmc); in power5p_compute_mmcr() 598 mmcr->mmcr1 = mmcr1; in power5p_compute_mmcr() 606 mmcr->mmcr1 &= ~(0x7fUL << MMCR1_PMCSEL_SH(pmc)); in power5p_disable_pmc()
|
H A D | power7-pmu.c | 251 unsigned long mmcr1 = 0; in power7_compute_mmcr() local 290 mmcr1 |= (unsigned long) unit in power7_compute_mmcr() 292 mmcr1 |= (unsigned long) combine in power7_compute_mmcr() 294 mmcr1 |= psel << MMCR1_PMCSEL_SH(pmc); in power7_compute_mmcr() 296 mmcr1 |= (unsigned long) l2sel in power7_compute_mmcr() 310 mmcr->mmcr1 = mmcr1; in power7_compute_mmcr() 318 mmcr->mmcr1 &= ~(0xffUL << MMCR1_PMCSEL_SH(pmc)); in power7_disable_pmc()
|
H A D | isa207-common.c | 562 unsigned long mmcra, mmcr1, mmcr2, unit, combine, psel, cache, val; in isa207_compute_mmcr() local 576 mmcra = mmcr1 = mmcr2 = mmcr3 = 0; in isa207_compute_mmcr() 602 mmcr1 |= unit << MMCR1_UNIT_SHIFT(pmc); in isa207_compute_mmcr() 603 mmcr1 |= combine << combine_shift(pmc); in isa207_compute_mmcr() 604 mmcr1 |= psel << MMCR1_PMCSEL_SHIFT(pmc); in isa207_compute_mmcr() 612 mmcr1 |= (cache) << MMCR1_DC_IC_QUAL_SHIFT; in isa207_compute_mmcr() 616 mmcr1 |= (cache) << MMCR1_DC_IC_QUAL_SHIFT; in isa207_compute_mmcr() 624 mmcr1 |= val << p10_MMCR1_RADIX_SCOPE_QUAL_SHIFT; in isa207_compute_mmcr() 642 mmcr1 |= ((event[i] >> EVENT_THR_CTL_SHIFT) & in isa207_compute_mmcr() 725 mmcr->mmcr1 = mmcr1; in isa207_compute_mmcr() [all …]
|
H A D | mpc7450-pmu.c | 268 u32 mmcr0 = 0, mmcr1 = 0, mmcr2 = 0; in mpc7450_compute_mmcr() local 314 mmcr1 |= ev; in mpc7450_compute_mmcr() 326 mmcr->mmcr1 = mmcr1; in mpc7450_compute_mmcr() 347 mmcr->mmcr1 &= ~(pmcsel_mask[pmc] << pmcsel_shift[pmc]); in mpc7450_disable_pmc()
|
H A D | core-book3s.c | 1469 mtspr(SPRN_MMCR1, cpuhw->mmcr.mmcr1); in power_pmu_enable() 1509 mtspr(SPRN_MMCR1, cpuhw->mmcr.mmcr1); in power_pmu_enable()
|
/openbmc/qemu/target/ppc/ |
H A D | power8-pmu.c | 41 target_ulong mmcr1 = env->spr[SPR_POWER_MMCR1]; in pmu_update_summaries() local 49 if (!(mmcr0 & MMCR0_FC14) && mmcr1 != 0) { in pmu_update_summaries() 52 sel = extract64(mmcr1, MMCR1_PMC1EVT_EXTR, MMCR1_EVT_SIZE); in pmu_update_summaries() 64 sel = extract64(mmcr1, MMCR1_PMC2EVT_EXTR, MMCR1_EVT_SIZE); in pmu_update_summaries() 68 sel = extract64(mmcr1, MMCR1_PMC3EVT_EXTR, MMCR1_EVT_SIZE); in pmu_update_summaries() 72 sel = extract64(mmcr1, MMCR1_PMC4EVT_EXTR, MMCR1_EVT_SIZE); in pmu_update_summaries() 175 target_ulong mmcr1 = env->spr[SPR_POWER_MMCR1]; in pmu_increment_insns() local 176 int sel = extract64(mmcr1, MMCR1_PMC4EVT_EXTR, MMCR1_EVT_SIZE); in pmu_increment_insns()
|
/openbmc/linux/arch/powerpc/kvm/ |
H A D | book3s_hv_p9_perf.c | 60 host_os_sprs->mmcr1 = mfspr(SPRN_MMCR1); in switch_pmu_to_guest() 201 mtspr(SPRN_MMCR1, host_os_sprs->mmcr1); in switch_pmu_to_host()
|
H A D | book3s_hv.h | 17 unsigned long mmcr1; member
|
/openbmc/linux/arch/powerpc/include/asm/ |
H A D | perf_event_server.h | 22 unsigned long mmcr1; member
|
/openbmc/linux/arch/powerpc/kernel/ |
H A D | sysfs.c | 603 SYSFS_PMCSETUP(mmcr1, SPRN_MMCR1); 673 __ATTR(mmcr1, 0600, show_mmcr1, store_mmcr1), 680 __ATTR(mmcr1, 0600, show_mmcr1, store_mmcr1), 704 __ATTR(mmcr1, 0600, show_mmcr1, store_mmcr1),
|
/openbmc/linux/tools/perf/arch/powerpc/util/ |
H A D | perf_regs.c | 67 SMPL_REG(mmcr1, PERF_REG_POWERPC_MMCR1),
|
/openbmc/linux/arch/powerpc/platforms/powernv/ |
H A D | idle.c | 598 u32 mmcr1; member 675 sprs.mmcr1 = mfspr(SPRN_MMCR1); in power9_idle_stop() 791 mtspr(SPRN_MMCR1, sprs.mmcr1); in power9_idle_stop()
|
/openbmc/qemu/include/hw/ppc/ |
H A D | spapr_nested.h | 479 uint64_t mmcr1; member
|
/openbmc/qemu/hw/ppc/ |
H A D | spapr_nested.c | 207 save->mmcr1 = env->spr[SPR_POWER_MMCR1]; in nested_save_state() 306 env->spr[SPR_POWER_MMCR1] = load->mmcr1; in nested_load_state() 995 GUEST_STATE_ELEMENT_ENV_DW(GSB_VCPU_SPR_MMCR1, mmcr1),
|