Lines Matching refs:pmu_ptr
1614 static void imc_common_mem_free(struct imc_pmu *pmu_ptr)
1616 if (pmu_ptr->attr_groups[IMC_EVENT_ATTR])
1617 kfree(pmu_ptr->attr_groups[IMC_EVENT_ATTR]->attrs);
1618 kfree(pmu_ptr->attr_groups[IMC_EVENT_ATTR]);
1627 static void imc_common_cpuhp_mem_free(struct imc_pmu *pmu_ptr)
1629 if (pmu_ptr->domain == IMC_DOMAIN_NEST) {
1644 if (pmu_ptr->domain == IMC_DOMAIN_CORE) {
1650 if (pmu_ptr->domain == IMC_DOMAIN_THREAD) {
1655 if (pmu_ptr->domain == IMC_DOMAIN_TRACE) {
1675 static int imc_mem_init(struct imc_pmu *pmu_ptr, struct device_node *parent,
1684 switch (pmu_ptr->domain) {
1687 pmu_ptr->pmu.name = kasprintf(GFP_KERNEL, "%s%s_imc", "nest_", s);
1688 if (!pmu_ptr->pmu.name)
1699 per_nest_pmu_arr[pmu_index] = pmu_ptr;
1703 pmu_ptr->pmu.name = kasprintf(GFP_KERNEL, "%s%s", s, "_imc");
1704 if (!pmu_ptr->pmu.name)
1708 pmu_ptr->mem_info = kcalloc(nr_cores, sizeof(struct imc_mem_info),
1711 if (!pmu_ptr->mem_info)
1718 kfree(pmu_ptr->mem_info);
1722 core_imc_pmu = pmu_ptr;
1726 pmu_ptr->pmu.name = kasprintf(GFP_KERNEL, "%s%s", s, "_imc");
1727 if (!pmu_ptr->pmu.name)
1730 thread_imc_mem_size = pmu_ptr->counter_mem_size;
1732 res = thread_imc_mem_alloc(cpu, pmu_ptr->counter_mem_size);
1739 thread_imc_pmu = pmu_ptr;
1743 pmu_ptr->pmu.name = kasprintf(GFP_KERNEL, "%s%s", s, "_imc");
1744 if (!pmu_ptr->pmu.name)
1753 trace_imc_mem_size = pmu_ptr->counter_mem_size;
1775 * @pmu_ptr: memory allocated for this pmu
1781 int init_imc_pmu(struct device_node *parent, struct imc_pmu *pmu_ptr, int pmu_idx)
1785 ret = imc_mem_init(pmu_ptr, parent, pmu_idx);
1789 switch (pmu_ptr->domain) {
1847 ret = update_events_in_group(parent, pmu_ptr);
1851 ret = update_pmu_ops(pmu_ptr);
1855 ret = perf_pmu_register(&pmu_ptr->pmu, pmu_ptr->pmu.name, -1);
1860 pmu_ptr->pmu.name);
1865 imc_common_cpuhp_mem_free(pmu_ptr);
1867 imc_common_mem_free(pmu_ptr);