/openbmc/linux/drivers/net/wireless/ath/wil6210/ |
H A D | pmc.c | 44 struct pmc_ctx *pmc = &wil->pmc; in wil_pmc_alloc() local 117 &pmc->pring_pa, in wil_pmc_alloc() 126 pmc->pring_va, &pmc->pring_pa, in wil_pmc_alloc() 228 struct pmc_ctx *pmc = &wil->pmc; in wil_pmc_free() local 268 dma_free_coherent(dev, buf_size, pmc->pring_va, pmc->pring_pa); in wil_pmc_free() 279 i < pmc->num_descriptors && pmc->descriptors[i].va; i++) { in wil_pmc_free() 318 struct pmc_ctx *pmc = &wil->pmc; in wil_pmc_read() local 333 pmc_size = pmc->descriptor_size * pmc->num_descriptors; in wil_pmc_read() 374 struct pmc_ctx *pmc = &wil->pmc; in wil_pmc_llseek() local 386 pmc_size = pmc->descriptor_size * pmc->num_descriptors; in wil_pmc_llseek() [all …]
|
/openbmc/linux/tools/testing/selftests/powerpc/pmu/sampling_tests/ |
H A D | misc.h | 61 static inline int get_mmcr0_fc56(u64 mmcr0, int pmc) in get_mmcr0_fc56() argument 108 return ((mmcr1 >> (38 - ((pmc - 1) * 2))) & 0x3); in get_mmcr1_comb() 123 return ((mmcr2 & (1ull << (63 - (((pmc) - 1) * 9)))) >> (63 - (((pmc) - 1) * 9))); in get_mmcr2_fcs() 128 return ((mmcr2 & (1ull << (62 - (((pmc) - 1) * 9)))) >> (62 - (((pmc) - 1) * 9))); in get_mmcr2_fcp() 133 return ((mmcr2 & (1ull << (61 - (((pmc) - 1) * 9)))) >> (61 - (((pmc) - 1) * 9))); in get_mmcr2_fcpc() 138 return ((mmcr2 & (1ull << (60 - (((pmc) - 1) * 9)))) >> (60 - (((pmc) - 1) * 9))); in get_mmcr2_fcm1() 143 return ((mmcr2 & (1ull << (59 - (((pmc) - 1) * 9)))) >> (59 - (((pmc) - 1) * 9))); in get_mmcr2_fcm0() 148 return ((mmcr2 & (1ull << (58 - (((pmc) - 1) * 9)))) >> (58 - (((pmc) - 1) * 9))); in get_mmcr2_fcwait() 153 return ((mmcr2 & (1ull << (57 - (((pmc) - 1) * 9)))) >> (57 - (((pmc) - 1) * 9))); in get_mmcr2_fch() 158 return ((mmcr2 & (1ull << (56 - (((pmc) - 1) * 9)))) >> (56 - (((pmc) - 1) * 9))); in get_mmcr2_fcti() [all …]
|
/openbmc/linux/arch/x86/kvm/ |
H A D | pmu.c | 222 if (!pmc->perf_event || pmc->is_paused) in pmc_pause_counter() 227 pmc->counter = counter & pmc_bitmask(pmc); in pmc_pause_counter() 239 get_sample_period(pmc, pmc->counter))) in pmc_resume_counter() 266 pmc->counter = pmc_read_counter(pmc); in pmc_stop_counter() 411 if (pmc->counter < pmc->prev_counter) in reprogram_counter() 533 if (!pmc) in kvm_pmu_rdpmc() 572 if (pmc) in kvm_pmu_mark_pmc_in_use() 762 if (pmc && pmc->perf_event && !pmc_speculative_in_use(pmc)) in kvm_pmu_cleanup() 778 pmc->prev_counter = pmc->counter; in kvm_pmu_incr_counter() 779 pmc->counter = (pmc->counter + 1) & pmc_bitmask(pmc); in kvm_pmu_incr_counter() [all …]
|
H A D | pmu.h | 9 #define pmc_to_pmu(pmc) (&(pmc)->vcpu->arch.pmu) argument 69 counter = pmc->counter; in pmc_read_counter() 70 if (pmc->perf_event && !pmc->is_paused) in pmc_read_counter() 74 return counter & pmc_bitmask(pmc); in pmc_read_counter() 79 pmc->counter += val - pmc_read_counter(pmc); in pmc_write_counter() 80 pmc->counter &= pmc_bitmask(pmc); in pmc_write_counter() 85 return pmc->type == KVM_PMC_GP; in pmc_is_gp() 142 if (!pmc->perf_event || pmc->is_paused || in pmc_update_sample_period() 147 get_sample_period(pmc, pmc->counter)); in pmc_update_sample_period() 154 if (pmc_is_fixed(pmc)) in pmc_speculative_in_use() [all …]
|
/openbmc/linux/drivers/soc/tegra/ |
H A D | pmc.c | 558 return (pmc->soc && pmc->soc->powergates[id]); in tegra_powergate_is_valid() 570 if (!pmc || !pmc->soc || !name) in tegra_powergate_lookup() 1025 pg->pmc = pmc; in tegra_powergate_sequence_power_up() 1300 pg->pmc = pmc; in tegra_powergate_add() 1957 pmc->soc->init(pmc); in tegra_pmc_init() 2285 &pmc->irq, pmc); in tegra_pmc_irq_alloc() 2315 &pmc->irq, pmc); in tegra_pmc_irq_alloc() 2529 pmc->irq.name = dev_name(pmc->dev); in tegra_pmc_irq_init() 2903 if (WARN_ON(!pmc->base || !pmc->soc)) in tegra_pmc_probe() 3003 pmc->rate = clk_get_rate(pmc->clk); in tegra_pmc_probe() [all …]
|
/openbmc/linux/drivers/platform/x86/intel/pmc/ |
H A D | core.c | 85 struct pmc *pmc = pmcdev->pmcs[PMC_IDX_MAIN]; in set_etr3() local 197 struct pmc *pmc = data; in pmc_core_dev_state_get() local 316 struct pmc *pmc = pmcdev->pmcs[i]; in pmc_core_ppfear_show() local 465 struct pmc *pmc; in pmc_core_send_ltr_ignore() local 629 struct pmc *pmc = pmcdev->pmcs[i]; in pmc_core_ltr_show() local 698 struct pmc *pmc = pmcdev->pmcs[i]; in pmc_core_substate_sts_regs_show() local 719 struct pmc *pmc = pmcdev->pmcs[i]; in pmc_core_substate_l_sts_regs_show() local 923 struct pmc *pmc = s->private; in pmc_core_pkgc_show() local 1036 pmc->regbase = ioremap(pmc->base_addr, pmc->map->regmap_length); in get_primary_reg_base() 1195 struct pmc *pmc = pmcdev->pmcs[i]; in pmc_core_clean_structure() local [all …]
|
/openbmc/u-boot/arch/arm/mach-at91/ |
H A D | clock.c | 25 writel(id, &pmc->pcr); in at91_periph_clk_enable() 27 div_value = readl(&pmc->pcr) & AT91_PMC_PCR_DIV; in at91_periph_clk_enable() 31 writel(regval, &pmc->pcr); in at91_periph_clk_enable() 33 writel(0x01 << id, &pmc->pcer); in at91_periph_clk_enable() 49 writel(regval, &pmc->pcr); in at91_periph_clk_disable() 51 writel(0x01 << id, &pmc->pcdr); in at91_periph_clk_disable() 59 writel(sys_clk, &pmc->scer); in at91_system_clk_enable() 66 writel(sys_clk, &pmc->scdr); in at91_system_clk_disable() 96 writel(readl(&pmc->uckr) & ~AT91_PMC_UPLLEN, &pmc->uckr); in at91_upll_clk_disable() 112 writel(value, &pmc->usb); in at91_usb_clk_init() [all …]
|
H A D | spl_atmel.c | 22 tmp = readl(&pmc->mor); in switch_to_main_crystal_osc() 28 writel(tmp, &pmc->mor); in switch_to_main_crystal_osc() 29 while (!(readl(&pmc->sr) & AT91_PMC_IXR_MOSCS)) in switch_to_main_crystal_osc() 34 tmp = readl(&pmc->mcfr); in switch_to_main_crystal_osc() 37 writel(tmp, &pmc->mcfr); in switch_to_main_crystal_osc() 46 tmp = readl(&pmc->mor); in switch_to_main_crystal_osc() 50 writel(tmp, &pmc->mor); in switch_to_main_crystal_osc() 52 tmp = readl(&pmc->mor); in switch_to_main_crystal_osc() 56 writel(tmp, &pmc->mor); in switch_to_main_crystal_osc() 68 tmp = readl(&pmc->mor); in switch_to_main_crystal_osc() [all …]
|
/openbmc/linux/arch/riscv/kvm/ |
H A D | vcpu_pmu.c | 41 if (!pmc->counter_val) in kvm_pmu_get_sample_period() 203 struct kvm_pmc *pmc; in pmu_ctr_read() local 207 pmc = &kvpmu->pmc[cidx]; in pmu_ctr_read() 357 pmc = &kvpmu->pmc[pmc_index]; in kvm_riscv_vcpu_pmu_ctr_start() 380 perf_event_period(pmc->perf_event, kvm_pmu_get_sample_period(pmc)); in kvm_riscv_vcpu_pmu_ctr_start() 414 pmc = &kvpmu->pmc[pmc_index]; in kvm_riscv_vcpu_pmu_ctr_stop() 437 pmc->counter_val += perf_event_read_value(pmc->perf_event, in kvm_riscv_vcpu_pmu_ctr_stop() 512 pmc = &kvpmu->pmc[ctr_idx]; in kvm_riscv_vcpu_pmu_ctr_cfg_match() 585 pmc = &kvpmu->pmc[i]; in kvm_riscv_vcpu_pmu_init() 586 pmc->idx = i; in kvm_riscv_vcpu_pmu_init() [all …]
|
/openbmc/linux/arch/powerpc/perf/ |
H A D | ppc970-pmu.c | 152 if (pmc) { in p970_marked_instr_event() 156 bit = (pmc <= 4)? pmc - 1: 8 - pmc; in p970_marked_instr_event() 200 if (pmc) { in p970_get_constraint() 219 if (!pmc) in p970_get_constraint() 284 if (pmc) { in p970_compute_mmcr() 296 if (!pmc) in p970_compute_mmcr() 360 for (pmc = 0; pmc < 8; ++pmc) { in p970_compute_mmcr() 375 --pmc; in p970_compute_mmcr() 387 for (pmc = 0; pmc < 2; ++pmc) in p970_compute_mmcr() 388 mmcr0 |= pmcsel[pmc] << (MMCR0_PMC1SEL_SH - 7 * pmc); in p970_compute_mmcr() [all …]
|
H A D | power7-pmu.c | 90 if (pmc) { in power7_get_constraint() 91 if (pmc > 6) in power7_get_constraint() 99 if (pmc < 5) { in power7_get_constraint() 151 if ((pmc == 2 || pmc == 4) && (psel & ~7) == 0x40) in find_alternative_decode() 153 if ((pmc == 1 || pmc == 3) && (psel & ~7) == 0x48) in find_alternative_decode() 221 if (pmc >= 5) in power7_marked_instr_event() 226 return pmc == 2 || pmc == 4; in power7_marked_instr_event() 260 if (pmc) { in power7_compute_mmcr() 276 if (!pmc) { in power7_compute_mmcr() 278 for (pmc = 0; pmc < 4; ++pmc) { in power7_compute_mmcr() [all …]
|
H A D | power6-pmu.c | 145 if (pmc >= 5) in power6_marked_instr_event() 151 if (pmc == 0 || !(ptype & (1 << (pmc - 1)))) in power6_marked_instr_event() 190 if (pmc) { in p6_compute_mmcr() 199 if (pmc) { in p6_compute_mmcr() 200 --pmc; in p6_compute_mmcr() 203 for (pmc = 0; pmc < 4; ++pmc) in p6_compute_mmcr() 210 hwc[i] = pmc; in p6_compute_mmcr() 246 if (pmc < 4) in p6_compute_mmcr() 276 if (pmc) { in p6_get_constraint() 307 return pmc == 5 || pmc == 6; in p6_limited_pmc_event() [all …]
|
H A D | power5-pmu.c | 147 if (pmc) { in power5_get_constraint() 148 if (pmc > 6) in power5_get_constraint() 186 if (!pmc) in power5_get_constraint() 256 if (pmc == 0 || pmc > 4) in find_alternative_bdecode() 360 else if (psel == 0x1b && (pmc == 1 || pmc == 3)) in power5_marked_instr_event() 408 if (pmc) { in power5_compute_mmcr() 431 if (!pmc) in power5_compute_mmcr() 497 if (!pmc) { in power5_compute_mmcr() 499 for (pmc = 0; pmc < 4; ++pmc) { in power5_compute_mmcr() 514 --pmc; in power5_compute_mmcr() [all …]
|
H A D | power5+-pmu.c | 142 if (pmc) { in power5p_get_constraint() 143 if (pmc > 6) in power5p_get_constraint() 179 if (pmc < 5) { in power5p_get_constraint() 193 return pmc == 5 || pmc == 6; in power5p_limited_pmc_event() 248 if (pmc == 0 || pmc > 4) in find_alternative_bdecode() 424 else if (psel == 0x1b && (pmc == 1 || pmc == 3)) in power5p_marked_instr_event() 475 if (pmc) { in power5p_compute_mmcr() 557 if (!pmc) { in power5p_compute_mmcr() 559 for (pmc = 0; pmc < 4; ++pmc) { in power5p_compute_mmcr() 568 --pmc; in power5p_compute_mmcr() [all …]
|
/openbmc/linux/drivers/mfd/ |
H A D | intel_pmc_bxt.c | 88 spin_lock(&pmc->gcr_lock); in intel_pmc_gcr_read64() 90 spin_unlock(&pmc->gcr_lock); in intel_pmc_gcr_read64() 115 spin_lock(&pmc->gcr_lock); in intel_pmc_gcr_update() 122 spin_unlock(&pmc->gcr_lock); in intel_pmc_gcr_update() 143 spin_lock(&pmc->gcr_lock); in intel_pmc_s0ix_counter_read() 388 pmc->telem_base = res; in intel_pmc_get_resources() 409 if (pmc->telem_base) { in intel_pmc_create_devices() 429 pmc = devm_kzalloc(&pdev->dev, sizeof(*pmc), GFP_KERNEL); in intel_pmc_probe() 430 if (!pmc) in intel_pmc_probe() 433 pmc->dev = &pdev->dev; in intel_pmc_probe() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/clock/ |
H A D | atmel,at91rm9200-pmc.yaml | 26 - atmel,at91sam9g15-pmc 27 - atmel,at91sam9g25-pmc 28 - atmel,at91sam9g35-pmc 35 - atmel,at91rm9200-pmc 39 - atmel,at91sam9rl-pmc 41 - atmel,sama5d2-pmc 42 - atmel,sama5d3-pmc 43 - atmel,sama5d4-pmc 126 - atmel,sama5d2-pmc 127 - atmel,sama5d3-pmc [all …]
|
/openbmc/u-boot/arch/arm/mach-at91/armv7/ |
H A D | clock.c | 69 tmp = readl(&pmc->mcfr); in at91_clock_init() 84 mckr = readl(&pmc->mckr); in at91_clock_init() 129 tmp = readl(&pmc->mckr); in at91_mck_init() 146 writel(tmp, &pmc->mckr); in at91_mck_init() 163 tmp = readl(&pmc->mckr); in at91_mck_init_down() 166 writel(tmp, &pmc->mckr); in at91_mck_init_down() 172 tmp = readl(&pmc->mckr); in at91_mck_init_down() 175 writel(tmp, &pmc->mckr); in at91_mck_init_down() 178 tmp = readl(&pmc->mckr); in at91_mck_init_down() 211 writel(id, &pmc->pcr); in at91_enable_periph_generated_clk() [all …]
|
/openbmc/linux/arch/arm64/kvm/ |
H A D | pmu-emul.c | 31 return container_of(pmc, struct kvm_vcpu, arch.pmu.pmc[pmc->idx]); in kvm_pmc_to_vcpu() 83 return (!(pmc->idx & 1) && (pmc->idx + 1) < ARMV8_PMU_CYCLE_IDX && in kvm_pmu_counter_can_chain() 109 if (pmc->perf_event) in kvm_pmu_get_pmc_value() 197 if (!pmc->perf_event) in kvm_pmu_stop_counter() 220 pmu->pmc[i].idx = i; in kvm_pmu_vcpu_init() 279 struct kvm_pmc *pmc; in kvm_pmu_enable_counter_mask() local 311 struct kvm_pmc *pmc; in kvm_pmu_disable_counter_mask() local 318 if (pmc->perf_event) in kvm_pmu_disable_counter_mask() 469 if (kvm_pmc_is_64bit(pmc) && kvm_pmc_has_64bit_overflow(pmc)) in compute_period() 487 int idx = pmc->idx; in kvm_pmu_perf_overflow() [all …]
|
/openbmc/linux/net/ipv4/ |
H A D | igmp.c | 178 pmc = rcu_dereference(pmc->next_rcu)) 183 pmc = rtnl_dereference(pmc->next_rcu)) 488 psf_list = sdeleted ? &pmc->tomb : &pmc->sources; in add_grec() 664 for (pmc = in_dev->mc_tomb; pmc; pmc = pmc_next) { in igmpv3_send_cr() 683 if (pmc->crcount == 0 && !pmc->tomb && !pmc->sources) { in igmpv3_send_cr() 735 __be32 group = pmc ? pmc->multiaddr : 0; in igmp_send_report() 1187 pmc = kzalloc(sizeof(*pmc), gfp); in igmpv3_add_delrec() 1188 if (!pmc) in igmpv3_add_delrec() 1226 for (pmc = in_dev->mc_tomb; pmc; pmc = pmc->next) { in igmpv3_del_delrec() 1270 for (; pmc; pmc = nextpmc) { in igmpv3_clear_delrec() [all …]
|
/openbmc/qemu/hw/ppc/ |
H A D | e500plat.c | 81 pmc->pci_first_slot = 0x1; in e500plat_machine_class_init() 82 pmc->pci_nr_slots = PCI_SLOT_MAX - 1; in e500plat_machine_class_init() 85 pmc->has_mpc8xxx_gpio = true; in e500plat_machine_class_init() 86 pmc->has_esdhc = true; in e500plat_machine_class_init() 88 pmc->platform_bus_size = 128 * MiB; in e500plat_machine_class_init() 89 pmc->platform_bus_first_irq = 5; in e500plat_machine_class_init() 90 pmc->platform_bus_num_irqs = 10; in e500plat_machine_class_init() 91 pmc->ccsrbar_base = 0xFE0000000ULL; in e500plat_machine_class_init() 92 pmc->pci_pio_base = 0xFE1000000ULL; in e500plat_machine_class_init() 93 pmc->pci_mmio_base = 0xC00000000ULL; in e500plat_machine_class_init() [all …]
|
H A D | mpc8544ds.c | 45 pmc->pci_first_slot = 0x11; in mpc8544ds_machine_class_init() 46 pmc->pci_nr_slots = 2; in mpc8544ds_machine_class_init() 49 pmc->platform_bus_base = 0xFF800000ULL; in mpc8544ds_machine_class_init() 50 pmc->platform_bus_size = 8 * MiB; in mpc8544ds_machine_class_init() 51 pmc->platform_bus_first_irq = 5; in mpc8544ds_machine_class_init() 52 pmc->platform_bus_num_irqs = 10; in mpc8544ds_machine_class_init() 53 pmc->ccsrbar_base = 0xE0000000ULL; in mpc8544ds_machine_class_init() 54 pmc->pci_mmio_base = 0xC0000000ULL; in mpc8544ds_machine_class_init() 55 pmc->pci_mmio_bus_base = 0xC0000000ULL; in mpc8544ds_machine_class_init() 56 pmc->pci_pio_base = 0xE1000000ULL; in mpc8544ds_machine_class_init() [all …]
|
/openbmc/linux/drivers/platform/x86/ |
H A D | pmc_atom.c | 218 if (!pmc->init) in pmc_atom_read() 273 struct pmc_dev *pmc = s->private; in pmc_dev_state_show() local 296 struct pmc_dev *pmc = s->private; in pmc_pss_state_show() local 313 struct pmc_dev *pmc = s->private; in pmc_sleep_tmr_show() local 338 pmc->dbgfs_dir = dir; in pmc_dbgfs_register() 469 pmc->regmap = ioremap(pmc->base_addr, PMC_MMIO_REG_LEN); in pmc_setup_dev() 470 if (!pmc->regmap) { in pmc_setup_dev() 475 pmc->map = map; in pmc_setup_dev() 478 pmc_hw_reg_setup(pmc); in pmc_setup_dev() 480 pmc_dbgfs_register(pmc); in pmc_setup_dev() [all …]
|
/openbmc/u-boot/arch/arm/mach-at91/arm926ejs/ |
H A D | clock.c | 127 tmp = readl(&pmc->mcfr); in at91_clock_init() 155 mckr = readl(&pmc->mckr); in at91_clock_init() 224 tmp = readl(&pmc->mckr); in at91_mck_init() 227 writel(tmp, &pmc->mckr); in at91_mck_init() 231 tmp = readl(&pmc->mckr); in at91_mck_init() 234 writel(tmp, &pmc->mckr); in at91_mck_init() 238 tmp = readl(&pmc->mckr); in at91_mck_init() 241 writel(tmp, &pmc->mckr); in at91_mck_init() 245 tmp = readl(&pmc->mckr); in at91_mck_init() 248 writel(tmp, &pmc->mckr); in at91_mck_init() [all …]
|
/openbmc/linux/drivers/platform/mellanox/ |
H A D | mlxbf-pmc.c | 468 if (pmc->svc_sreg_support) in mlxbf_pmc_read() 520 if (pmc->svc_sreg_support) in mlxbf_pmc_write() 557 switch (pmc->event_set) { in mlxbf_pmc_event_list() 1321 pmc->block[blk_num].block_attr_grp.attrs = pmc->block[blk_num].block_attr; in mlxbf_pmc_create_groups() 1326 pmc->groups[blk_num] = &pmc->block[blk_num].block_attr_grp; in mlxbf_pmc_create_groups() 1365 if (pmc->svc_sreg_support) in mlxbf_pmc_map_counters() 1402 if (!pmc) in mlxbf_pmc_probe() 1440 pmc->block_name, in mlxbf_pmc_probe() 1441 pmc->total_blocks); in mlxbf_pmc_probe() 1449 pmc->pdev = pdev; in mlxbf_pmc_probe() [all …]
|
/openbmc/linux/net/ipv6/ |
H A D | mcast.c | 120 pmc = sock_dereference(pmc->next, sk)) 125 pmc = rcu_dereference(pmc->next)) 742 pmc = kzalloc(sizeof(*pmc), GFP_KERNEL); in mld_add_delrec() 743 if (!pmc) in mld_add_delrec() 782 if (pmc) { in mld_del_delrec() 789 if (pmc) { in mld_del_delrec() 793 mc_dereference(pmc->mca_tomb, pmc->idev), in mld_del_delrec() 820 for (; pmc; pmc = nextpmc) { in mld_clear_delrec() 2062 pmc; in mld_send_cr() 2329 if (!pmc) in ip6_mc_del_src() [all …]
|