[PATCH 6/7] remoteproc: qcom: Check elf class before minidump

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Siddharth Gupta <sidgup@xxxxxxxxxxxxxx>

When the minidump is done with the elf64 class we need to create
the dumps using the section headers, otherwise we need to default
to dump creation using the program headers.

Fixes: 8ed8485c4f05 ("remoteproc: qcom: Add capability to collect minidumps")
Signed-off-by: Siddharth Gupta <sidgup@xxxxxxxxxxxxxx>
Signed-off-by: Sibi Sankar <quic_sibis@xxxxxxxxxxx>
---
 drivers/remoteproc/qcom_common.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c
index 4b91e3c9eafa..959fb24d57ec 100644
--- a/drivers/remoteproc/qcom_common.c
+++ b/drivers/remoteproc/qcom_common.c
@@ -174,7 +174,11 @@ void qcom_minidump(struct rproc *rproc, unsigned int minidump_id)
 		dev_err(&rproc->dev, "Failed with error: %d while adding minidump entries\n", ret);
 		goto clean_minidump;
 	}
-	rproc_coredump_using_sections(rproc);
+
+	if (rproc->elf_class == ELFCLASS64)
+		rproc_coredump_using_sections(rproc);
+	else
+		rproc_coredump(rproc);
 clean_minidump:
 	qcom_minidump_cleanup(rproc);
 }
-- 
2.7.4




[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux