Lines Matching refs:pmu_ptr

1622 static void imc_common_mem_free(struct imc_pmu *pmu_ptr)
1624 if (pmu_ptr->attr_groups[IMC_EVENT_ATTR])
1625 kfree(pmu_ptr->attr_groups[IMC_EVENT_ATTR]->attrs);
1626 kfree(pmu_ptr->attr_groups[IMC_EVENT_ATTR]);
1635 static void imc_common_cpuhp_mem_free(struct imc_pmu *pmu_ptr)
1637 if (pmu_ptr->domain == IMC_DOMAIN_NEST) {
1652 if (pmu_ptr->domain == IMC_DOMAIN_CORE) {
1658 if (pmu_ptr->domain == IMC_DOMAIN_THREAD) {
1663 if (pmu_ptr->domain == IMC_DOMAIN_TRACE) {
1683 static int imc_mem_init(struct imc_pmu *pmu_ptr, struct device_node *parent,
1692 switch (pmu_ptr->domain) {
1695 pmu_ptr->pmu.name = kasprintf(GFP_KERNEL, "%s%s_imc", "nest_", s);
1696 if (!pmu_ptr->pmu.name)
1707 per_nest_pmu_arr[pmu_index] = pmu_ptr;
1711 pmu_ptr->pmu.name = kasprintf(GFP_KERNEL, "%s%s", s, "_imc");
1712 if (!pmu_ptr->pmu.name)
1716 pmu_ptr->mem_info = kcalloc(nr_cores, sizeof(struct imc_mem_info),
1719 if (!pmu_ptr->mem_info)
1726 kfree(pmu_ptr->mem_info);
1730 core_imc_pmu = pmu_ptr;
1734 pmu_ptr->pmu.name = kasprintf(GFP_KERNEL, "%s%s", s, "_imc");
1735 if (!pmu_ptr->pmu.name)
1738 thread_imc_mem_size = pmu_ptr->counter_mem_size;
1740 res = thread_imc_mem_alloc(cpu, pmu_ptr->counter_mem_size);
1747 thread_imc_pmu = pmu_ptr;
1751 pmu_ptr->pmu.name = kasprintf(GFP_KERNEL, "%s%s", s, "_imc");
1752 if (!pmu_ptr->pmu.name)
1761 trace_imc_mem_size = pmu_ptr->counter_mem_size;
1783 * @pmu_ptr: memory allocated for this pmu
1789 int init_imc_pmu(struct device_node *parent, struct imc_pmu *pmu_ptr, int pmu_idx)
1793 ret = imc_mem_init(pmu_ptr, parent, pmu_idx);
1797 switch (pmu_ptr->domain) {
1855 ret = update_events_in_group(parent, pmu_ptr);
1859 ret = update_pmu_ops(pmu_ptr);
1863 ret = perf_pmu_register(&pmu_ptr->pmu, pmu_ptr->pmu.name, -1);
1868 pmu_ptr->pmu.name);
1873 imc_common_cpuhp_mem_free(pmu_ptr);
1875 imc_common_mem_free(pmu_ptr);