Lines Matching refs:pmu_ptr
1608 static void imc_common_mem_free(struct imc_pmu *pmu_ptr) in imc_common_mem_free() argument
1610 if (pmu_ptr->attr_groups[IMC_EVENT_ATTR]) in imc_common_mem_free()
1611 kfree(pmu_ptr->attr_groups[IMC_EVENT_ATTR]->attrs); in imc_common_mem_free()
1612 kfree(pmu_ptr->attr_groups[IMC_EVENT_ATTR]); in imc_common_mem_free()
1621 static void imc_common_cpuhp_mem_free(struct imc_pmu *pmu_ptr) in imc_common_cpuhp_mem_free() argument
1623 if (pmu_ptr->domain == IMC_DOMAIN_NEST) { in imc_common_cpuhp_mem_free()
1638 if (pmu_ptr->domain == IMC_DOMAIN_CORE) { in imc_common_cpuhp_mem_free()
1644 if (pmu_ptr->domain == IMC_DOMAIN_THREAD) { in imc_common_cpuhp_mem_free()
1649 if (pmu_ptr->domain == IMC_DOMAIN_TRACE) { in imc_common_cpuhp_mem_free()
1669 static int imc_mem_init(struct imc_pmu *pmu_ptr, struct device_node *parent, in imc_mem_init() argument
1678 switch (pmu_ptr->domain) { in imc_mem_init()
1681 pmu_ptr->pmu.name = kasprintf(GFP_KERNEL, "%s%s_imc", "nest_", s); in imc_mem_init()
1682 if (!pmu_ptr->pmu.name) in imc_mem_init()
1693 per_nest_pmu_arr[pmu_index] = pmu_ptr; in imc_mem_init()
1697 pmu_ptr->pmu.name = kasprintf(GFP_KERNEL, "%s%s", s, "_imc"); in imc_mem_init()
1698 if (!pmu_ptr->pmu.name) in imc_mem_init()
1702 pmu_ptr->mem_info = kcalloc(nr_cores, sizeof(struct imc_mem_info), in imc_mem_init()
1705 if (!pmu_ptr->mem_info) in imc_mem_init()
1712 kfree(pmu_ptr->mem_info); in imc_mem_init()
1716 core_imc_pmu = pmu_ptr; in imc_mem_init()
1720 pmu_ptr->pmu.name = kasprintf(GFP_KERNEL, "%s%s", s, "_imc"); in imc_mem_init()
1721 if (!pmu_ptr->pmu.name) in imc_mem_init()
1724 thread_imc_mem_size = pmu_ptr->counter_mem_size; in imc_mem_init()
1726 res = thread_imc_mem_alloc(cpu, pmu_ptr->counter_mem_size); in imc_mem_init()
1733 thread_imc_pmu = pmu_ptr; in imc_mem_init()
1737 pmu_ptr->pmu.name = kasprintf(GFP_KERNEL, "%s%s", s, "_imc"); in imc_mem_init()
1738 if (!pmu_ptr->pmu.name) in imc_mem_init()
1747 trace_imc_mem_size = pmu_ptr->counter_mem_size; in imc_mem_init()
1775 int init_imc_pmu(struct device_node *parent, struct imc_pmu *pmu_ptr, int pmu_idx) in init_imc_pmu() argument
1779 ret = imc_mem_init(pmu_ptr, parent, pmu_idx); in init_imc_pmu()
1783 switch (pmu_ptr->domain) { in init_imc_pmu()
1841 ret = update_events_in_group(parent, pmu_ptr); in init_imc_pmu()
1845 ret = update_pmu_ops(pmu_ptr); in init_imc_pmu()
1849 ret = perf_pmu_register(&pmu_ptr->pmu, pmu_ptr->pmu.name, -1); in init_imc_pmu()
1854 pmu_ptr->pmu.name); in init_imc_pmu()
1859 imc_common_cpuhp_mem_free(pmu_ptr); in init_imc_pmu()
1861 imc_common_mem_free(pmu_ptr); in init_imc_pmu()