Lines Matching refs:pmu_ptr

1623 static void imc_common_mem_free(struct imc_pmu *pmu_ptr)  in imc_common_mem_free()  argument
1625 if (pmu_ptr->attr_groups[IMC_EVENT_ATTR]) in imc_common_mem_free()
1626 kfree(pmu_ptr->attr_groups[IMC_EVENT_ATTR]->attrs); in imc_common_mem_free()
1627 kfree(pmu_ptr->attr_groups[IMC_EVENT_ATTR]); in imc_common_mem_free()
1636 static void imc_common_cpuhp_mem_free(struct imc_pmu *pmu_ptr) in imc_common_cpuhp_mem_free() argument
1638 if (pmu_ptr->domain == IMC_DOMAIN_NEST) { in imc_common_cpuhp_mem_free()
1653 if (pmu_ptr->domain == IMC_DOMAIN_CORE) { in imc_common_cpuhp_mem_free()
1659 if (pmu_ptr->domain == IMC_DOMAIN_THREAD) { in imc_common_cpuhp_mem_free()
1664 if (pmu_ptr->domain == IMC_DOMAIN_TRACE) { in imc_common_cpuhp_mem_free()
1684 static int imc_mem_init(struct imc_pmu *pmu_ptr, struct device_node *parent, in imc_mem_init() argument
1693 switch (pmu_ptr->domain) { in imc_mem_init()
1696 pmu_ptr->pmu.name = kasprintf(GFP_KERNEL, "%s%s_imc", "nest_", s); in imc_mem_init()
1697 if (!pmu_ptr->pmu.name) in imc_mem_init()
1708 per_nest_pmu_arr[pmu_index] = pmu_ptr; in imc_mem_init()
1712 pmu_ptr->pmu.name = kasprintf(GFP_KERNEL, "%s%s", s, "_imc"); in imc_mem_init()
1713 if (!pmu_ptr->pmu.name) in imc_mem_init()
1717 pmu_ptr->mem_info = kcalloc(nr_cores, sizeof(struct imc_mem_info), in imc_mem_init()
1720 if (!pmu_ptr->mem_info) in imc_mem_init()
1727 kfree(pmu_ptr->mem_info); in imc_mem_init()
1731 core_imc_pmu = pmu_ptr; in imc_mem_init()
1735 pmu_ptr->pmu.name = kasprintf(GFP_KERNEL, "%s%s", s, "_imc"); in imc_mem_init()
1736 if (!pmu_ptr->pmu.name) in imc_mem_init()
1739 thread_imc_mem_size = pmu_ptr->counter_mem_size; in imc_mem_init()
1741 res = thread_imc_mem_alloc(cpu, pmu_ptr->counter_mem_size); in imc_mem_init()
1748 thread_imc_pmu = pmu_ptr; in imc_mem_init()
1752 pmu_ptr->pmu.name = kasprintf(GFP_KERNEL, "%s%s", s, "_imc"); in imc_mem_init()
1753 if (!pmu_ptr->pmu.name) in imc_mem_init()
1762 trace_imc_mem_size = pmu_ptr->counter_mem_size; in imc_mem_init()
1790 int init_imc_pmu(struct device_node *parent, struct imc_pmu *pmu_ptr, int pmu_idx) in init_imc_pmu() argument
1794 ret = imc_mem_init(pmu_ptr, parent, pmu_idx); in init_imc_pmu()
1798 switch (pmu_ptr->domain) { in init_imc_pmu()
1856 ret = update_events_in_group(parent, pmu_ptr); in init_imc_pmu()
1860 ret = update_pmu_ops(pmu_ptr); in init_imc_pmu()
1864 ret = perf_pmu_register(&pmu_ptr->pmu, pmu_ptr->pmu.name, -1); in init_imc_pmu()
1869 pmu_ptr->pmu.name); in init_imc_pmu()
1874 imc_common_cpuhp_mem_free(pmu_ptr); in init_imc_pmu()
1876 imc_common_mem_free(pmu_ptr); in init_imc_pmu()