Skip to content

Commit 42a31d4

Browse files
MrVansudeep-holla
authored andcommitted
firmware: arm_scmi: Log the perf domain names in the error paths
Currently, the performance domain names are not logged whenever any error occurs when processing the OPPs by adding to local data structures or to the OPP library. It would be easier to locate the problem if domain name is printed out. So let us add the performance domain names to the other information logged already in the error paths. Signed-off-by: Peng Fan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sudeep Holla <[email protected]>
1 parent 4cece76 commit 42a31d4

File tree

1 file changed

+8
-7
lines changed
  • drivers/firmware/arm_scmi

1 file changed

+8
-7
lines changed

drivers/firmware/arm_scmi/perf.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,8 @@ process_response_opp(struct device *dev, struct perf_dom_info *dom,
387387

388388
ret = xa_insert(&dom->opps_by_lvl, opp->perf, opp, GFP_KERNEL);
389389
if (ret)
390-
dev_warn(dev, "Failed to add opps_by_lvl at %d - ret:%d\n",
391-
opp->perf, ret);
390+
dev_warn(dev, "Failed to add opps_by_lvl at %d for %s - ret:%d\n",
391+
opp->perf, dom->info.name, ret);
392392
}
393393

394394
static inline void
@@ -405,8 +405,8 @@ process_response_opp_v4(struct device *dev, struct perf_dom_info *dom,
405405

406406
ret = xa_insert(&dom->opps_by_lvl, opp->perf, opp, GFP_KERNEL);
407407
if (ret)
408-
dev_warn(dev, "Failed to add opps_by_lvl at %d - ret:%d\n",
409-
opp->perf, ret);
408+
dev_warn(dev, "Failed to add opps_by_lvl at %d for %s - ret:%d\n",
409+
opp->perf, dom->info.name, ret);
410410

411411
/* Note that PERF v4 reports always five 32-bit words */
412412
opp->indicative_freq = le32_to_cpu(r->opp[loop_idx].indicative_freq);
@@ -417,8 +417,8 @@ process_response_opp_v4(struct device *dev, struct perf_dom_info *dom,
417417
GFP_KERNEL);
418418
if (ret)
419419
dev_warn(dev,
420-
"Failed to add opps_by_idx at %d - ret:%d\n",
421-
opp->level_index, ret);
420+
"Failed to add opps_by_idx at %d for %s - ret:%d\n",
421+
opp->level_index, dom->info.name, ret);
422422

423423
hash_add(dom->opps_by_freq, &opp->hash, opp->indicative_freq);
424424
}
@@ -879,7 +879,8 @@ static int scmi_dvfs_device_opps_add(const struct scmi_protocol_handle *ph,
879879

880880
ret = dev_pm_opp_add_dynamic(dev, &data);
881881
if (ret) {
882-
dev_warn(dev, "failed to add opp %luHz\n", freq);
882+
dev_warn(dev, "[%d][%s]: Failed to add OPP[%d] %lu\n",
883+
domain, dom->info.name, idx, freq);
883884
dev_pm_opp_remove_all_dynamic(dev);
884885
return ret;
885886
}

0 commit comments

Comments
 (0)