From nobody Wed Nov 27 16:50:05 2024 Received: from mx08-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BEF1126C0A; Tue, 26 Nov 2024 09:15:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.207.212.93 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612526; cv=none; b=F45NXiRgZ5HszZdW6sEh3SaGgcnQRKuYHjJXXBl9+XQNubdjQrMHHm32dNnyU//f4jxzsmFR5CsyyxME63Szfva7LpKudP9aVDDBMUa3LUxtrAFOir8Qj/ZeLVy+aD2nA1a8zpxD6LbNMS/RuLbepKywYEGxIFCvYkdfVe7r1n4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612526; c=relaxed/simple; bh=DIApcsRarfJuvLio7GM2KLnSvShs2N0fFv/gngSFK1E=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=stCRZ/GQJsjevEEu2pIcZ0HpaLRB1D2NVvuAbsLPijndXfnDjgrK4dNbf9uJn1FyKZJSolQq8G2m4N4jFKDrEKZ77d0YdXxKA6WWyFTSLfNRGfKJUPQl3W50VUzmmGu4BP6AfTF6ukx058eR3RI+AP7cpfAtPM2TAjdAh8cyWhU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com; spf=pass smtp.mailfrom=foss.st.com; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b=j2DEkQSQ; arc=none smtp.client-ip=91.207.212.93 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foss.st.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b="j2DEkQSQ" Received: from pps.filterd (m0369457.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4AQ53nEO010578; Tue, 26 Nov 2024 10:14:53 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=selector1; bh= af+pCFkEn5Uu729dokQ2oyPRG7AjK5zrbHT8BSaQwXA=; b=j2DEkQSQTe492lcG gS0U0q0v2UIULKggBuTovDLoFUw1C5CQz5f2bbY4ScSxyqdaUBmhqrxcCwrF/A0Q QFx4zcdiMGk8YvpvdHO9pmmLldStB3gaOfiu8zYQIK5lcVjTUKDO6RcEnhB1YCJZ GQx7SmuqaGh6Hv8pmYCTfcB46d8IASQNRDeHTTLq5mDd1tJ0RbnEZkpHyFffSPdg p1e2cNw/Vbw+5YfJ2jLWge/aAU/IHKqCcM+gPsEq6NouvjkHh3UEmwKwFU9wNeny 8Zc3iGdDvz1obYOqRx3xQn5vXj9yzuos83puU8R8GnQOU3TPWV1trv8iCuJUkKvh 9I0VkA== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 433tvnhaxf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Nov 2024 10:14:53 +0100 (CET) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 358754002D; Tue, 26 Nov 2024 10:13:00 +0100 (CET) Received: from Webmail-eu.st.com (eqndag1node6.st.com [10.75.129.135]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 2F54426B64E; Tue, 26 Nov 2024 10:11:14 +0100 (CET) Received: from SAFDAG1NODE1.st.com (10.75.90.17) by EQNDAG1NODE6.st.com (10.75.129.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.37; Tue, 26 Nov 2024 10:11:14 +0100 Received: from localhost (10.48.86.121) by SAFDAG1NODE1.st.com (10.75.90.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.37; Tue, 26 Nov 2024 10:11:13 +0100 From: Arnaud Pouliquen To: Bjorn Andersson , Mathieu Poirier , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Neil Armstrong , Kevin Hilman , "Jerome Brunet" , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Patrice Chotard , Maxime Coquelin , Alexandre Torgue CC: Arnaud Pouliquen , , , , , , , , Subject: [PATCH v14 4/8] remoteproc: Rename load() operation to load_segments() in rproc_ops struct Date: Tue, 26 Nov 2024 10:10:35 +0100 Message-ID: <20241126091042.918144-5-arnaud.pouliquen@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241126091042.918144-1-arnaud.pouliquen@foss.st.com> References: <20241126091042.918144-1-arnaud.pouliquen@foss.st.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SAFCAS1NODE1.st.com (10.75.90.11) To SAFDAG1NODE1.st.com (10.75.90.17) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 Content-Type: text/plain; charset="utf-8" With the introduction of the load_fw() operation in the rproc_ops structure, we need to clarify the difference in the use of the load() and load_fw() ops. The legacy load() is dedicated to loading the ELF segments into memory. Rename this to a more explicit name: load_segments(). Suggested-by: Mathieu Poirier Signed-off-by: Arnaud Pouliquen --- drivers/remoteproc/imx_dsp_rproc.c | 2 +- drivers/remoteproc/imx_rproc.c | 2 +- drivers/remoteproc/meson_mx_ao_arc.c | 2 +- drivers/remoteproc/mtk_scp.c | 2 +- drivers/remoteproc/qcom_q6v5_adsp.c | 2 +- drivers/remoteproc/qcom_q6v5_mss.c | 2 +- drivers/remoteproc/qcom_q6v5_pas.c | 4 ++-- drivers/remoteproc/qcom_q6v5_wcss.c | 4 ++-- drivers/remoteproc/qcom_wcnss.c | 2 +- drivers/remoteproc/rcar_rproc.c | 2 +- drivers/remoteproc/remoteproc_core.c | 4 ++-- drivers/remoteproc/remoteproc_internal.h | 4 ++-- drivers/remoteproc/st_remoteproc.c | 2 +- drivers/remoteproc/st_slim_rproc.c | 2 +- drivers/remoteproc/stm32_rproc.c | 2 +- drivers/remoteproc/xlnx_r5_remoteproc.c | 2 +- include/linux/remoteproc.h | 4 ++-- 17 files changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_ds= p_rproc.c index 376187ad5754..a4a85fbce907 100644 --- a/drivers/remoteproc/imx_dsp_rproc.c +++ b/drivers/remoteproc/imx_dsp_rproc.c @@ -934,7 +934,7 @@ static const struct rproc_ops imx_dsp_rproc_ops =3D { .start =3D imx_dsp_rproc_start, .stop =3D imx_dsp_rproc_stop, .kick =3D imx_dsp_rproc_kick, - .load =3D imx_dsp_rproc_elf_load_segments, + .load_segments =3D imx_dsp_rproc_elf_load_segments, .parse_fw =3D imx_dsp_rproc_parse_fw, .find_loaded_rsc_table =3D rproc_elf_find_loaded_rsc_table, .sanity_check =3D rproc_elf_sanity_check, diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 800015ff7ff9..f45b3207f7e9 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -681,7 +681,7 @@ static const struct rproc_ops imx_rproc_ops =3D { .stop =3D imx_rproc_stop, .kick =3D imx_rproc_kick, .da_to_va =3D imx_rproc_da_to_va, - .load =3D rproc_elf_load_segments, + .load_segments =3D rproc_elf_load_segments, .parse_fw =3D imx_rproc_parse_fw, .find_loaded_rsc_table =3D imx_rproc_elf_find_loaded_rsc_table, .get_loaded_rsc_table =3D imx_rproc_get_loaded_rsc_table, diff --git a/drivers/remoteproc/meson_mx_ao_arc.c b/drivers/remoteproc/meso= n_mx_ao_arc.c index f6744b538323..a1c8c0929ce3 100644 --- a/drivers/remoteproc/meson_mx_ao_arc.c +++ b/drivers/remoteproc/meson_mx_ao_arc.c @@ -137,7 +137,7 @@ static struct rproc_ops meson_mx_ao_arc_rproc_ops =3D { .stop =3D meson_mx_ao_arc_rproc_stop, .da_to_va =3D meson_mx_ao_arc_rproc_da_to_va, .get_boot_addr =3D rproc_elf_get_boot_addr, - .load =3D rproc_elf_load_segments, + .load_segments =3D rproc_elf_load_segments, .sanity_check =3D rproc_elf_sanity_check, }; =20 diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c index e744c07507ee..4e9a8bf3bc6e 100644 --- a/drivers/remoteproc/mtk_scp.c +++ b/drivers/remoteproc/mtk_scp.c @@ -924,7 +924,7 @@ static int scp_stop(struct rproc *rproc) static const struct rproc_ops scp_ops =3D { .start =3D scp_start, .stop =3D scp_stop, - .load =3D scp_load, + .load_segments =3D scp_load, .da_to_va =3D scp_da_to_va, .parse_fw =3D scp_parse_fw, .sanity_check =3D rproc_elf_sanity_check, diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_= q6v5_adsp.c index 572dcb0f055b..aa9896930bcf 100644 --- a/drivers/remoteproc/qcom_q6v5_adsp.c +++ b/drivers/remoteproc/qcom_q6v5_adsp.c @@ -527,7 +527,7 @@ static const struct rproc_ops adsp_ops =3D { .stop =3D adsp_stop, .da_to_va =3D adsp_da_to_va, .parse_fw =3D adsp_parse_firmware, - .load =3D adsp_load, + .load_segments =3D adsp_load, .panic =3D adsp_panic, }; =20 diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q= 6v5_mss.c index 2a42215ce8e0..a8beac1deabe 100644 --- a/drivers/remoteproc/qcom_q6v5_mss.c +++ b/drivers/remoteproc/qcom_q6v5_mss.c @@ -1687,7 +1687,7 @@ static const struct rproc_ops q6v5_ops =3D { .start =3D q6v5_start, .stop =3D q6v5_stop, .parse_fw =3D qcom_q6v5_register_dump_segments, - .load =3D q6v5_load, + .load_segments =3D q6v5_load, .panic =3D q6v5_panic, }; =20 diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q= 6v5_pas.c index ef82835e98a4..9b269ce390c1 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -436,7 +436,7 @@ static const struct rproc_ops adsp_ops =3D { .stop =3D adsp_stop, .da_to_va =3D adsp_da_to_va, .parse_fw =3D qcom_register_dump_segments, - .load =3D adsp_load, + .load_segments =3D adsp_load, .panic =3D adsp_panic, }; =20 @@ -446,7 +446,7 @@ static const struct rproc_ops adsp_minidump_ops =3D { .stop =3D adsp_stop, .da_to_va =3D adsp_da_to_va, .parse_fw =3D qcom_register_dump_segments, - .load =3D adsp_load, + .load_segments =3D adsp_load, .panic =3D adsp_panic, .coredump =3D adsp_minidump, }; diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_= q6v5_wcss.c index e913dabae992..44b5736dc8b9 100644 --- a/drivers/remoteproc/qcom_q6v5_wcss.c +++ b/drivers/remoteproc/qcom_q6v5_wcss.c @@ -771,7 +771,7 @@ static const struct rproc_ops q6v5_wcss_ipq8074_ops =3D= { .start =3D q6v5_wcss_start, .stop =3D q6v5_wcss_stop, .da_to_va =3D q6v5_wcss_da_to_va, - .load =3D q6v5_wcss_load, + .load_segments =3D q6v5_wcss_load, .get_boot_addr =3D rproc_elf_get_boot_addr, }; =20 @@ -779,7 +779,7 @@ static const struct rproc_ops q6v5_wcss_qcs404_ops =3D { .start =3D q6v5_qcs404_wcss_start, .stop =3D q6v5_wcss_stop, .da_to_va =3D q6v5_wcss_da_to_va, - .load =3D q6v5_wcss_load, + .load_segments =3D q6v5_wcss_load, .get_boot_addr =3D rproc_elf_get_boot_addr, .parse_fw =3D qcom_register_dump_segments, }; diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcns= s.c index a7bb9da27029..42102bc4c458 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -335,7 +335,7 @@ static const struct rproc_ops wcnss_ops =3D { .stop =3D wcnss_stop, .da_to_va =3D wcnss_da_to_va, .parse_fw =3D qcom_register_dump_segments, - .load =3D wcnss_load, + .load_segments =3D wcnss_load, }; =20 static irqreturn_t wcnss_wdog_interrupt(int irq, void *dev) diff --git a/drivers/remoteproc/rcar_rproc.c b/drivers/remoteproc/rcar_rpro= c.c index cc17e8421f65..e36778fec072 100644 --- a/drivers/remoteproc/rcar_rproc.c +++ b/drivers/remoteproc/rcar_rproc.c @@ -142,7 +142,7 @@ static struct rproc_ops rcar_rproc_ops =3D { .prepare =3D rcar_rproc_prepare, .start =3D rcar_rproc_start, .stop =3D rcar_rproc_stop, - .load =3D rproc_elf_load_segments, + .load_segments =3D rproc_elf_load_segments, .parse_fw =3D rcar_rproc_parse_fw, .find_loaded_rsc_table =3D rproc_elf_find_loaded_rsc_table, .sanity_check =3D rproc_elf_sanity_check, diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remo= teproc_core.c index 8df4b2c59bb6..e4ad024efcda 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -2485,11 +2485,11 @@ static int rproc_alloc_ops(struct rproc *rproc, con= st struct rproc_ops *ops) if (!rproc->ops->coredump) rproc->ops->coredump =3D rproc_coredump; =20 - if (rproc->ops->load || rproc->ops->load_fw) + if (rproc->ops->load_segments || rproc->ops->load_fw) return 0; =20 /* Default to ELF loader if no load function is specified */ - rproc->ops->load =3D rproc_elf_load_segments; + rproc->ops->load_segments =3D rproc_elf_load_segments; rproc->ops->parse_fw =3D rproc_elf_load_rsc_table; rproc->ops->find_loaded_rsc_table =3D rproc_elf_find_loaded_rsc_table; rproc->ops->sanity_check =3D rproc_elf_sanity_check; diff --git a/drivers/remoteproc/remoteproc_internal.h b/drivers/remoteproc/= remoteproc_internal.h index 2104ca449178..b898494600cf 100644 --- a/drivers/remoteproc/remoteproc_internal.h +++ b/drivers/remoteproc/remoteproc_internal.h @@ -167,8 +167,8 @@ u64 rproc_get_boot_addr(struct rproc *rproc, const stru= ct firmware *fw) static inline int rproc_load_segments(struct rproc *rproc, const struct firmware *fw) { - if (rproc->ops->load) - return rproc->ops->load(rproc, fw); + if (rproc->ops->load_segments) + return rproc->ops->load_segments(rproc, fw); =20 return -EINVAL; } diff --git a/drivers/remoteproc/st_remoteproc.c b/drivers/remoteproc/st_rem= oteproc.c index 1340be9d0110..8d6b75e91531 100644 --- a/drivers/remoteproc/st_remoteproc.c +++ b/drivers/remoteproc/st_remoteproc.c @@ -233,7 +233,7 @@ static const struct rproc_ops st_rproc_ops =3D { .start =3D st_rproc_start, .stop =3D st_rproc_stop, .parse_fw =3D st_rproc_parse_fw, - .load =3D rproc_elf_load_segments, + .load_segments =3D rproc_elf_load_segments, .find_loaded_rsc_table =3D rproc_elf_find_loaded_rsc_table, .sanity_check =3D rproc_elf_sanity_check, .get_boot_addr =3D rproc_elf_get_boot_addr, diff --git a/drivers/remoteproc/st_slim_rproc.c b/drivers/remoteproc/st_sli= m_rproc.c index 5412beb0a692..0f91d8f1e7c7 100644 --- a/drivers/remoteproc/st_slim_rproc.c +++ b/drivers/remoteproc/st_slim_rproc.c @@ -201,7 +201,7 @@ static const struct rproc_ops slim_rproc_ops =3D { .stop =3D slim_rproc_stop, .da_to_va =3D slim_rproc_da_to_va, .get_boot_addr =3D rproc_elf_get_boot_addr, - .load =3D rproc_elf_load_segments, + .load_segments =3D rproc_elf_load_segments, .sanity_check =3D rproc_elf_sanity_check, }; =20 diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rp= roc.c index 8c7f7950b80e..7e8ffd9fcc57 100644 --- a/drivers/remoteproc/stm32_rproc.c +++ b/drivers/remoteproc/stm32_rproc.c @@ -667,7 +667,7 @@ static const struct rproc_ops st_rproc_ops =3D { .attach =3D stm32_rproc_attach, .detach =3D stm32_rproc_detach, .kick =3D stm32_rproc_kick, - .load =3D rproc_elf_load_segments, + .load_segments =3D rproc_elf_load_segments, .parse_fw =3D stm32_rproc_parse_fw, .find_loaded_rsc_table =3D rproc_elf_find_loaded_rsc_table, .get_loaded_rsc_table =3D stm32_rproc_get_loaded_rsc_table, diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/x= lnx_r5_remoteproc.c index 5aeedeaf3c41..59cfba0a02e7 100644 --- a/drivers/remoteproc/xlnx_r5_remoteproc.c +++ b/drivers/remoteproc/xlnx_r5_remoteproc.c @@ -864,7 +864,7 @@ static const struct rproc_ops zynqmp_r5_rproc_ops =3D { .unprepare =3D zynqmp_r5_rproc_unprepare, .start =3D zynqmp_r5_rproc_start, .stop =3D zynqmp_r5_rproc_stop, - .load =3D rproc_elf_load_segments, + .load_segments =3D rproc_elf_load_segments, .parse_fw =3D zynqmp_r5_parse_fw, .find_loaded_rsc_table =3D rproc_elf_find_loaded_rsc_table, .sanity_check =3D rproc_elf_sanity_check, diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index ba6fd560f7ba..55c20424a99f 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -374,7 +374,7 @@ enum rsc_handling_status { * @find_loaded_rsc_table: find the loaded resource table from firmware im= age * @get_loaded_rsc_table: get resource table installed in memory * by external entity - * @load: load firmware to memory, where the remote processor + * @load_segments: load firmware ELF segment to memory, where the remote p= rocessor * expects to find it * @sanity_check: sanity check the fw image * @get_boot_addr: get boot address to entry point specified in firmware @@ -402,7 +402,7 @@ struct rproc_ops { struct rproc *rproc, const struct firmware *fw); struct resource_table *(*get_loaded_rsc_table)( struct rproc *rproc, size_t *size); - int (*load)(struct rproc *rproc, const struct firmware *fw); + int (*load_segments)(struct rproc *rproc, const struct firmware *fw); int (*sanity_check)(struct rproc *rproc, const struct firmware *fw); u64 (*get_boot_addr)(struct rproc *rproc, const struct firmware *fw); unsigned long (*panic)(struct rproc *rproc); --=20 2.25.1