Skip to content

Draft: soc: qcom: mdt_loader: Split out split-file-loader

Steve Best requested to merge sfbest/centos-stream-9:2100219 into main

Description: The automotive kernel sets CONFIG_QCOM_IPA=m that selects CONFIG_QCOM_MDT_LOADER=m and therefore triggers the build of mdt_loader.c.

Actual results: The following build error:

drivers/soc/qcom/mdt_loader.c:129:23: error: implicit declaration of function 'mdt_load_split_segment' [-Werror=implicit-function-declaration] 129 | ret = mdt_load_split_segment(data + ehdr_size, phdrs, 1, fw_name, dev); | ^~~~~~~~~~~~~~~~~~~~~~

Bugzilla: http://bugzilla.redhat.com/2100219

Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=46140552

Tested: mdt_loader.c now builds successfully.

commit 26c1f17013a8292fa2bd59917bace883e1fe6afa Author: Bjorn Andersson bjorn.andersson@linaro.org Date: Thu Jan 27 18:55:02 2022 -0800

soc: qcom: mdt_loader: Split out split-file-loader

Spotted in a SM8450 device, the hash metadata segment is split out in a
separate .bNN file which means that the logic for loading split out
segmenents needs to be duplicated in qcom_mdt_read_metadata().

Split out the existing logic to a helper function that can be used in
both code paths.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20220128025513.97188-3-bjorn.andersson@linaro.org

Signed-off-by: Steve Best sbest@redhat.com

Edited by Steve Best

Merge request reports