Lines Matching refs:pmu_ptr
51 struct imc_pmu *pmu_ptr) in export_imc_mode_and_cmd() argument
56 struct imc_mem_info *ptr = pmu_ptr->mem_info; in export_imc_mode_and_cmd()
83 struct imc_pmu *pmu_ptr, in imc_get_mem_addr_nest() argument
111 pmu_ptr->mem_info = kcalloc(nr_chips + 1, sizeof(*pmu_ptr->mem_info), in imc_get_mem_addr_nest()
113 if (!pmu_ptr->mem_info) in imc_get_mem_addr_nest()
117 pmu_ptr->mem_info[i].id = chipid_arr[i]; in imc_get_mem_addr_nest()
119 pmu_ptr->mem_info[i].vbase = phys_to_virt(baddr); in imc_get_mem_addr_nest()
122 pmu_ptr->imc_counter_mmaped = true; in imc_get_mem_addr_nest()
141 struct imc_pmu *pmu_ptr; in imc_pmu_create() local
149 pmu_ptr = kzalloc(sizeof(*pmu_ptr), GFP_KERNEL); in imc_pmu_create()
150 if (!pmu_ptr) in imc_pmu_create()
154 pmu_ptr->domain = domain; in imc_pmu_create()
156 ret = of_property_read_u32(parent, "size", &pmu_ptr->counter_mem_size); in imc_pmu_create()
161 if (imc_get_mem_addr_nest(parent, pmu_ptr, offset)) in imc_pmu_create()
166 ret = init_imc_pmu(parent, pmu_ptr, pmu_index); in imc_pmu_create()
168 pr_err("IMC PMU %s Register failed\n", pmu_ptr->pmu.name); in imc_pmu_create()
169 kfree(pmu_ptr->pmu.name); in imc_pmu_create()
170 if (pmu_ptr->domain == IMC_DOMAIN_NEST) in imc_pmu_create()
171 kfree(pmu_ptr->mem_info); in imc_pmu_create()
172 kfree(pmu_ptr); in imc_pmu_create()
176 return pmu_ptr; in imc_pmu_create()
179 kfree(pmu_ptr); in imc_pmu_create()