Lines Matching refs:nd_pmu

410 	struct nvdimm_pmu *nd_pmu = to_nvdimm_pmu(event->pmu);  in papr_scm_pmu_event_init()  local
413 if (!nd_pmu) in papr_scm_pmu_event_init()
428 p = (struct papr_scm_priv *)nd_pmu->dev->driver_data; in papr_scm_pmu_event_init()
443 struct nvdimm_pmu *nd_pmu = to_nvdimm_pmu(event->pmu); in papr_scm_pmu_add() local
445 if (!nd_pmu) in papr_scm_pmu_add()
449 rc = papr_scm_pmu_get_value(event, nd_pmu->dev, &count); in papr_scm_pmu_add()
463 struct nvdimm_pmu *nd_pmu = to_nvdimm_pmu(event->pmu); in papr_scm_pmu_read() local
465 if (!nd_pmu) in papr_scm_pmu_read()
468 rc = papr_scm_pmu_get_value(event, nd_pmu->dev, &now); in papr_scm_pmu_read()
483 struct nvdimm_pmu *nd_pmu; in papr_scm_pmu_register() local
486 nd_pmu = kzalloc(sizeof(*nd_pmu), GFP_KERNEL); in papr_scm_pmu_register()
487 if (!nd_pmu) { in papr_scm_pmu_register()
497 nd_pmu->pmu.task_ctx_nr = perf_invalid_context; in papr_scm_pmu_register()
498 nd_pmu->pmu.name = nvdimm_name(p->nvdimm); in papr_scm_pmu_register()
499 nd_pmu->pmu.event_init = papr_scm_pmu_event_init; in papr_scm_pmu_register()
500 nd_pmu->pmu.read = papr_scm_pmu_read; in papr_scm_pmu_register()
501 nd_pmu->pmu.add = papr_scm_pmu_add; in papr_scm_pmu_register()
502 nd_pmu->pmu.del = papr_scm_pmu_del; in papr_scm_pmu_register()
504 nd_pmu->pmu.capabilities = PERF_PMU_CAP_NO_INTERRUPT | in papr_scm_pmu_register()
509 nd_pmu->arch_cpumask = *cpumask_of_node(nodeid); in papr_scm_pmu_register()
511 rc = register_nvdimm_pmu(nd_pmu, p->pdev); in papr_scm_pmu_register()
519 p->pdev->archdata.priv = nd_pmu; in papr_scm_pmu_register()
523 kfree(nd_pmu); in papr_scm_pmu_register()