diff mbox series

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

Message ID 1653398017-28426-7-git-send-email-quic_sibis@quicinc.com (mailing list archive)
State Superseded
Headers show
Series Miscellaneous PAS fixes | expand

Commit Message

Sibi Sankar May 24, 2022, 1:13 p.m. UTC
From: Siddharth Gupta <sidgup@codeaurora.org>

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@codeaurora.org>
Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com>
---
 drivers/remoteproc/qcom_common.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

kernel test robot May 26, 2022, 5:59 a.m. UTC | #1
Hi Sibi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on remoteproc/rproc-next]
[cannot apply to linux/master linus/master v5.18]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/intel-lab-lkp/linux/commits/Sibi-Sankar/Miscellaneous-PAS-fixes/20220524-211743
base:   git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git rproc-next
config: arm-allmodconfig (https://download.01.org/0day-ci/archive/20220526/202205261332.p94yBoKE-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/0db77918ce08718d9dbaadd1ceed8dcfb6488abf
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Sibi-Sankar/Miscellaneous-PAS-fixes/20220524-211743
        git checkout 0db77918ce08718d9dbaadd1ceed8dcfb6488abf
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>, old ones prefixed by <<):

>> ERROR: modpost: "rproc_coredump" [drivers/remoteproc/qcom_common.ko] undefined!
diff mbox series

Patch

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);
 }