remoteproc: use rproc_coredump_set_elf_info in drivers

Modify drivers which are using remoteproc coredump functionality to use
rproc_coredump_set_elf_info in order to create correct elf coredump
format.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Clement Leger <cleger@kalray.eu>
Link: https://lore.kernel.org/r/20200410102433.2672-3-cleger@kalray.eu
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
Clement Leger 2020-04-10 12:24:33 +02:00 committed by Bjorn Andersson
parent 418fd78771
commit 3898fc99d1
5 changed files with 7 additions and 0 deletions

View File

@ -431,6 +431,7 @@ static int adsp_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "unable to allocate remoteproc\n"); dev_err(&pdev->dev, "unable to allocate remoteproc\n");
return -ENOMEM; return -ENOMEM;
} }
rproc_coredump_set_elf_info(rproc, ELFCLASS32, EM_NONE);
adsp = (struct qcom_adsp *)rproc->priv; adsp = (struct qcom_adsp *)rproc->priv;
adsp->dev = &pdev->dev; adsp->dev = &pdev->dev;

View File

@ -1357,6 +1357,8 @@ static int qcom_q6v5_register_dump_segments(struct rproc *rproc,
return ret; return ret;
} }
rproc_coredump_set_elf_info(rproc, ELFCLASS32, EM_NONE);
ehdr = (struct elf32_hdr *)fw->data; ehdr = (struct elf32_hdr *)fw->data;
phdrs = (struct elf32_phdr *)(ehdr + 1); phdrs = (struct elf32_phdr *)(ehdr + 1);
qproc->dump_complete_mask = 0; qproc->dump_complete_mask = 0;
@ -1667,6 +1669,7 @@ static int q6v5_probe(struct platform_device *pdev)
} }
rproc->auto_boot = false; rproc->auto_boot = false;
rproc_coredump_set_elf_info(rproc, ELFCLASS32, EM_NONE);
qproc = (struct q6v5 *)rproc->priv; qproc = (struct q6v5 *)rproc->priv;
qproc->dev = &pdev->dev; qproc->dev = &pdev->dev;

View File

@ -398,6 +398,7 @@ static int adsp_probe(struct platform_device *pdev)
} }
rproc->auto_boot = desc->auto_boot; rproc->auto_boot = desc->auto_boot;
rproc_coredump_set_elf_info(rproc, ELFCLASS32, EM_NONE);
adsp = (struct qcom_adsp *)rproc->priv; adsp = (struct qcom_adsp *)rproc->priv;
adsp->dev = &pdev->dev; adsp->dev = &pdev->dev;

View File

@ -480,6 +480,7 @@ static int wcnss_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "unable to allocate remoteproc\n"); dev_err(&pdev->dev, "unable to allocate remoteproc\n");
return -ENOMEM; return -ENOMEM;
} }
rproc_coredump_set_elf_info(rproc, ELFCLASS32, EM_NONE);
wcnss = (struct qcom_wcnss *)rproc->priv; wcnss = (struct qcom_wcnss *)rproc->priv;
wcnss->dev = &pdev->dev; wcnss->dev = &pdev->dev;

View File

@ -625,6 +625,7 @@ static int stm32_rproc_probe(struct platform_device *pdev)
if (!rproc) if (!rproc)
return -ENOMEM; return -ENOMEM;
rproc_coredump_set_elf_info(rproc, ELFCLASS32, EM_NONE);
rproc->has_iommu = false; rproc->has_iommu = false;
ddata = rproc->priv; ddata = rproc->priv;
ddata->workqueue = create_workqueue(dev_name(dev)); ddata->workqueue = create_workqueue(dev_name(dev));