summaryrefslogtreecommitdiff
path: root/drivers/remoteproc/qcom_q6v5_mss.c
diff options
context:
space:
mode:
authorRishabh Bhatnagar <rishabhb@codeaurora.org>2020-07-17 01:20:33 +0300
committerBjorn Andersson <bjorn.andersson@linaro.org>2020-07-22 00:03:37 +0300
commit76abf9cea6c8215ea45b9359f11f0e30127c544a (patch)
tree1389f920bbae5604b0c074d6451de3b052714c09 /drivers/remoteproc/qcom_q6v5_mss.c
parent7ac516d39dd35450596a2dbb9dedea2c85eab1ea (diff)
downloadlinux-76abf9cea6c8215ea45b9359f11f0e30127c544a.tar.xz
remoteproc: Pass size and offset as arguments to segment dump function
Change the segment dump API signature to include size and offset arguments. Refactor the qcom_q6v5_mss driver to use these arguments while copying the segment. Doing this lays the ground work for "inline" coredump functionality being added in the next patch. Tested-by: Sibi Sankar <sibis@codeaurora.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: Sibi Sankar <sibis@codeaurora.org> Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org> Link: https://lore.kernel.org/r/1594938035-7327-4-git-send-email-rishabhb@codeaurora.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc/qcom_q6v5_mss.c')
-rw-r--r--drivers/remoteproc/qcom_q6v5_mss.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
index 1ee809b772ff..a3c412a3f143 100644
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -1202,7 +1202,7 @@ out:
static void qcom_q6v5_dump_segment(struct rproc *rproc,
struct rproc_dump_segment *segment,
- void *dest)
+ void *dest, size_t cp_offset, size_t size)
{
int ret = 0;
struct q6v5 *qproc = rproc->priv;
@@ -1222,16 +1222,16 @@ static void qcom_q6v5_dump_segment(struct rproc *rproc,
}
if (!ret)
- ptr = ioremap_wc(qproc->mpss_phys + offset, segment->size);
+ ptr = ioremap_wc(qproc->mpss_phys + offset + cp_offset, size);
if (ptr) {
- memcpy(dest, ptr, segment->size);
+ memcpy(dest, ptr, size);
iounmap(ptr);
} else {
- memset(dest, 0xff, segment->size);
+ memset(dest, 0xff, size);
}
- qproc->current_dump_size += segment->size;
+ qproc->current_dump_size += size;
/* Reclaim mba after copying segments */
if (qproc->current_dump_size == qproc->total_dump_size) {