linux-remoteproc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/4] net: ipa: support COMPILE_TEST
@ 2021-01-07 23:34 Alex Elder
  2021-01-07 23:34 ` [PATCH net-next 1/4] remoteproc: qcom: expose types for COMPILE_TEST Alex Elder
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Alex Elder @ 2021-01-07 23:34 UTC (permalink / raw)
  To: davem, kuba, bjorn.andersson, agross, ohad
  Cc: evgreen, cpratapa, subashab, netdev, linux-arm-msm,
	linux-remoteproc, linux-kernel

This series adds the IPA driver as a possible target when
the COMPILE_TEST configuration is enabled.  Two small changes to
dependent subsystems needed to be made for this to work.

Version 2 of this series adds one more patch, which adds the
declation of struct page to "gsi_trans.h".  The Intel kernel test
robot reported that this was a problem for the alpha build.

David/Jakub, please take all four of these patches through the
net-next tree if you find them acceptable.

Thanks.

					-Alex

Alex Elder (4):
  remoteproc: qcom: expose types for COMPILE_TEST
  soc: qcom: mdt_loader: define stubs for COMPILE_TEST
  net: ipa: declare the page pointer type in "gsi_trans.h"
  net: ipa: support COMPILE_TEST

 drivers/net/ipa/Kconfig               | 10 +++++---
 drivers/net/ipa/gsi_trans.h           |  1 +
 include/linux/remoteproc/qcom_rproc.h |  4 +--
 include/linux/soc/qcom/mdt_loader.h   | 35 +++++++++++++++++++++++++++
 4 files changed, 44 insertions(+), 6 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH net-next 1/4] remoteproc: qcom: expose types for COMPILE_TEST
  2021-01-07 23:34 [PATCH net-next 0/4] net: ipa: support COMPILE_TEST Alex Elder
@ 2021-01-07 23:34 ` Alex Elder
  2021-01-07 23:34 ` [PATCH net-next 2/4] soc: qcom: mdt_loader: define stubs " Alex Elder
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Alex Elder @ 2021-01-07 23:34 UTC (permalink / raw)
  To: bjorn.andersson, agross, ohad
  Cc: davem, kuba, evgreen, cpratapa, subashab, netdev, linux-arm-msm,
	linux-remoteproc, linux-kernel

Stub functions are defined for SSR notifier registration in case
QCOM_RPROC_COMMON is not configured.  As a result, code that uses
these functions can link successfully even if the common remoteproc
code is not built.

Code that registers an SSR notifier function likely needs the
types defined in "qcom_rproc.h", but those are only exposed if
QCOM_RPROC_COMMON is enabled.

Rearrange the conditional definition so the qcom_ssr_notify_data
structure and qcom_ssr_notify_type enumerated type are defined
whether or not QCOM_RPROC_COMMON is enabled.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Alex Elder <elder@linaro.org>
---
 include/linux/remoteproc/qcom_rproc.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/remoteproc/qcom_rproc.h b/include/linux/remoteproc/qcom_rproc.h
index 6470516621749..82b211518136e 100644
--- a/include/linux/remoteproc/qcom_rproc.h
+++ b/include/linux/remoteproc/qcom_rproc.h
@@ -3,8 +3,6 @@
 
 struct notifier_block;
 
-#if IS_ENABLED(CONFIG_QCOM_RPROC_COMMON)
-
 /**
  * enum qcom_ssr_notify_type - Startup/Shutdown events related to a remoteproc
  * processor.
@@ -26,6 +24,8 @@ struct qcom_ssr_notify_data {
 	bool crashed;
 };
 
+#if IS_ENABLED(CONFIG_QCOM_RPROC_COMMON)
+
 void *qcom_register_ssr_notifier(const char *name, struct notifier_block *nb);
 int qcom_unregister_ssr_notifier(void *notify, struct notifier_block *nb);
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH net-next 2/4] soc: qcom: mdt_loader: define stubs for COMPILE_TEST
  2021-01-07 23:34 [PATCH net-next 0/4] net: ipa: support COMPILE_TEST Alex Elder
  2021-01-07 23:34 ` [PATCH net-next 1/4] remoteproc: qcom: expose types for COMPILE_TEST Alex Elder
@ 2021-01-07 23:34 ` Alex Elder
  2021-01-07 23:34 ` [PATCH net-next 3/4] net: ipa: declare the page pointer type in "gsi_trans.h" Alex Elder
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Alex Elder @ 2021-01-07 23:34 UTC (permalink / raw)
  To: bjorn.andersson, agross
  Cc: davem, kuba, ohad, evgreen, cpratapa, subashab, netdev,
	linux-arm-msm, linux-remoteproc, linux-kernel

Define stub functions for the exposed MDT functions in case
QCOM_MDT_LOADER is not configured.  This allows users of these
functions to link correctly for COMPILE_TEST builds without
QCOM_SCM enabled.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Alex Elder <elder@linaro.org>
---
 include/linux/soc/qcom/mdt_loader.h | 35 +++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/include/linux/soc/qcom/mdt_loader.h b/include/linux/soc/qcom/mdt_loader.h
index e600baec68253..afd47217996b0 100644
--- a/include/linux/soc/qcom/mdt_loader.h
+++ b/include/linux/soc/qcom/mdt_loader.h
@@ -11,6 +11,8 @@
 struct device;
 struct firmware;
 
+#if IS_ENABLED(CONFIG_QCOM_MDT_LOADER)
+
 ssize_t qcom_mdt_get_size(const struct firmware *fw);
 int qcom_mdt_load(struct device *dev, const struct firmware *fw,
 		  const char *fw_name, int pas_id, void *mem_region,
@@ -23,4 +25,37 @@ int qcom_mdt_load_no_init(struct device *dev, const struct firmware *fw,
 			  phys_addr_t *reloc_base);
 void *qcom_mdt_read_metadata(const struct firmware *fw, size_t *data_len);
 
+#else /* !IS_ENABLED(CONFIG_QCOM_MDT_LOADER) */
+
+static inline ssize_t qcom_mdt_get_size(const struct firmware *fw)
+{
+	return -ENODEV;
+}
+
+static inline int qcom_mdt_load(struct device *dev, const struct firmware *fw,
+				const char *fw_name, int pas_id,
+				void *mem_region, phys_addr_t mem_phys,
+				size_t mem_size, phys_addr_t *reloc_base)
+{
+	return -ENODEV;
+}
+
+static inline int qcom_mdt_load_no_init(struct device *dev,
+					const struct firmware *fw,
+					const char *fw_name, int pas_id,
+					void *mem_region, phys_addr_t mem_phys,
+					size_t mem_size,
+					phys_addr_t *reloc_base)
+{
+	return -ENODEV;
+}
+
+static inline void *qcom_mdt_read_metadata(const struct firmware *fw,
+					   size_t *data_len)
+{
+	return ERR_PTR(-ENODEV);
+}
+
+#endif /* !IS_ENABLED(CONFIG_QCOM_MDT_LOADER) */
+
 #endif
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH net-next 3/4] net: ipa: declare the page pointer type in "gsi_trans.h"
  2021-01-07 23:34 [PATCH net-next 0/4] net: ipa: support COMPILE_TEST Alex Elder
  2021-01-07 23:34 ` [PATCH net-next 1/4] remoteproc: qcom: expose types for COMPILE_TEST Alex Elder
  2021-01-07 23:34 ` [PATCH net-next 2/4] soc: qcom: mdt_loader: define stubs " Alex Elder
@ 2021-01-07 23:34 ` Alex Elder
  2021-01-07 23:34 ` [PATCH net-next 4/4] net: ipa: support COMPILE_TEST Alex Elder
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Alex Elder @ 2021-01-07 23:34 UTC (permalink / raw)
  To: davem, kuba
  Cc: bjorn.andersson, agross, ohad, evgreen, cpratapa, subashab, lkp,
	netdev, linux-arm-msm, linux-remoteproc, linux-kernel

The second argument to gsi_trans_page_add() is a page pointer.
That declaration is found in header files used by "gsi_trans.h" for
(at least) arm64 and x86 builds, but apparently not for alpha
builds.

Fix this by adding a declaration of struct page to the top of
"gsi_trans.h".

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Alex Elder <elder@linaro.org>
---
 drivers/net/ipa/gsi_trans.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ipa/gsi_trans.h b/drivers/net/ipa/gsi_trans.h
index 4d4606b5fa951..3a4ab8a94d827 100644
--- a/drivers/net/ipa/gsi_trans.h
+++ b/drivers/net/ipa/gsi_trans.h
@@ -13,6 +13,7 @@
 
 #include "ipa_cmd.h"
 
+struct page;
 struct scatterlist;
 struct device;
 struct sk_buff;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH net-next 4/4] net: ipa: support COMPILE_TEST
  2021-01-07 23:34 [PATCH net-next 0/4] net: ipa: support COMPILE_TEST Alex Elder
                   ` (2 preceding siblings ...)
  2021-01-07 23:34 ` [PATCH net-next 3/4] net: ipa: declare the page pointer type in "gsi_trans.h" Alex Elder
@ 2021-01-07 23:34 ` Alex Elder
  2021-01-08  0:25   ` Bjorn Andersson
  2021-01-09 21:53 ` [PATCH net-next 0/4] " Jakub Kicinski
  2021-03-11 23:32 ` patchwork-bot+linux-remoteproc
  5 siblings, 1 reply; 8+ messages in thread
From: Alex Elder @ 2021-01-07 23:34 UTC (permalink / raw)
  To: davem, kuba
  Cc: bjorn.andersson, agross, ohad, evgreen, cpratapa, subashab,
	netdev, linux-arm-msm, linux-remoteproc, linux-kernel

Arrange for the IPA driver to be built when COMPILE_TEST is enabled.

Update the help text to reflect that we support two Qualcomm SoCs.

Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Alex Elder <elder@linaro.org>
---
 drivers/net/ipa/Kconfig | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ipa/Kconfig b/drivers/net/ipa/Kconfig
index 9f0d2a93379c5..10a0e041ee775 100644
--- a/drivers/net/ipa/Kconfig
+++ b/drivers/net/ipa/Kconfig
@@ -1,9 +1,10 @@
 config QCOM_IPA
 	tristate "Qualcomm IPA support"
-	depends on ARCH_QCOM && 64BIT && NET
-	depends on QCOM_Q6V5_MSS
+	depends on 64BIT && NET
+	depends on ARCH_QCOM || COMPILE_TEST
+	depends on QCOM_RPROC_COMMON || (QCOM_RPROC_COMMON=n && COMPILE_TEST)
+	select QCOM_MDT_LOADER if ARCH_QCOM
 	select QCOM_QMI_HELPERS
-	select QCOM_MDT_LOADER
 	help
 	  Choose Y or M here to include support for the Qualcomm
 	  IP Accelerator (IPA), a hardware block present in some
@@ -11,7 +12,8 @@ config QCOM_IPA
 	  that is capable of generic hardware handling of IP packets,
 	  including routing, filtering, and NAT.  Currently the IPA
 	  driver supports only basic transport of network traffic
-	  between the AP and modem, on the Qualcomm SDM845 SoC.
+	  between the AP and modem, on the Qualcomm SDM845 and SC7180
+	  SoCs.
 
 	  Note that if selected, the selection type must match that
 	  of QCOM_Q6V5_COMMON (Y or M).
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH net-next 4/4] net: ipa: support COMPILE_TEST
  2021-01-07 23:34 ` [PATCH net-next 4/4] net: ipa: support COMPILE_TEST Alex Elder
@ 2021-01-08  0:25   ` Bjorn Andersson
  0 siblings, 0 replies; 8+ messages in thread
From: Bjorn Andersson @ 2021-01-08  0:25 UTC (permalink / raw)
  To: Alex Elder
  Cc: davem, kuba, agross, ohad, evgreen, cpratapa, subashab, netdev,
	linux-arm-msm, linux-remoteproc, linux-kernel

On Thu 07 Jan 17:34 CST 2021, Alex Elder wrote:

> Arrange for the IPA driver to be built when COMPILE_TEST is enabled.
> 
> Update the help text to reflect that we support two Qualcomm SoCs.
> 
> Suggested-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Alex Elder <elder@linaro.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
>  drivers/net/ipa/Kconfig | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ipa/Kconfig b/drivers/net/ipa/Kconfig
> index 9f0d2a93379c5..10a0e041ee775 100644
> --- a/drivers/net/ipa/Kconfig
> +++ b/drivers/net/ipa/Kconfig
> @@ -1,9 +1,10 @@
>  config QCOM_IPA
>  	tristate "Qualcomm IPA support"
> -	depends on ARCH_QCOM && 64BIT && NET
> -	depends on QCOM_Q6V5_MSS
> +	depends on 64BIT && NET
> +	depends on ARCH_QCOM || COMPILE_TEST
> +	depends on QCOM_RPROC_COMMON || (QCOM_RPROC_COMMON=n && COMPILE_TEST)
> +	select QCOM_MDT_LOADER if ARCH_QCOM
>  	select QCOM_QMI_HELPERS
> -	select QCOM_MDT_LOADER
>  	help
>  	  Choose Y or M here to include support for the Qualcomm
>  	  IP Accelerator (IPA), a hardware block present in some
> @@ -11,7 +12,8 @@ config QCOM_IPA
>  	  that is capable of generic hardware handling of IP packets,
>  	  including routing, filtering, and NAT.  Currently the IPA
>  	  driver supports only basic transport of network traffic
> -	  between the AP and modem, on the Qualcomm SDM845 SoC.
> +	  between the AP and modem, on the Qualcomm SDM845 and SC7180
> +	  SoCs.
>  
>  	  Note that if selected, the selection type must match that
>  	  of QCOM_Q6V5_COMMON (Y or M).
> -- 
> 2.20.1
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH net-next 0/4] net: ipa: support COMPILE_TEST
  2021-01-07 23:34 [PATCH net-next 0/4] net: ipa: support COMPILE_TEST Alex Elder
                   ` (3 preceding siblings ...)
  2021-01-07 23:34 ` [PATCH net-next 4/4] net: ipa: support COMPILE_TEST Alex Elder
@ 2021-01-09 21:53 ` Jakub Kicinski
  2021-03-11 23:32 ` patchwork-bot+linux-remoteproc
  5 siblings, 0 replies; 8+ messages in thread
From: Jakub Kicinski @ 2021-01-09 21:53 UTC (permalink / raw)
  To: Alex Elder
  Cc: davem, bjorn.andersson, agross, ohad, evgreen, cpratapa,
	subashab, netdev, linux-arm-msm, linux-remoteproc, linux-kernel

On Thu,  7 Jan 2021 17:34:00 -0600 Alex Elder wrote:
> This series adds the IPA driver as a possible target when
> the COMPILE_TEST configuration is enabled.  Two small changes to
> dependent subsystems needed to be made for this to work.
> 
> Version 2 of this series adds one more patch, which adds the
> declation of struct page to "gsi_trans.h".  The Intel kernel test
> robot reported that this was a problem for the alpha build.
> 
> David/Jakub, please take all four of these patches through the
> net-next tree if you find them acceptable.

Applied, thanks a lot for doing this!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH net-next 0/4] net: ipa: support COMPILE_TEST
  2021-01-07 23:34 [PATCH net-next 0/4] net: ipa: support COMPILE_TEST Alex Elder
                   ` (4 preceding siblings ...)
  2021-01-09 21:53 ` [PATCH net-next 0/4] " Jakub Kicinski
@ 2021-03-11 23:32 ` patchwork-bot+linux-remoteproc
  5 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+linux-remoteproc @ 2021-03-11 23:32 UTC (permalink / raw)
  To: Alex Elder; +Cc: linux-remoteproc

Hello:

This series was applied to andersson/remoteproc.git (refs/heads/for-next):

On Thu,  7 Jan 2021 17:34:00 -0600 you wrote:
> This series adds the IPA driver as a possible target when
> the COMPILE_TEST configuration is enabled.  Two small changes to
> dependent subsystems needed to be made for this to work.
> 
> Version 2 of this series adds one more patch, which adds the
> declation of struct page to "gsi_trans.h".  The Intel kernel test
> robot reported that this was a problem for the alpha build.
> 
> [...]

Here is the summary with links:
  - [net-next,1/4] remoteproc: qcom: expose types for COMPILE_TEST
    https://git.kernel.org/andersson/remoteproc/c/994122211665
  - [net-next,2/4] soc: qcom: mdt_loader: define stubs for COMPILE_TEST
    https://git.kernel.org/andersson/remoteproc/c/ce2ceb9b1cff
  - [net-next,3/4] net: ipa: declare the page pointer type in "gsi_trans.h"
    https://git.kernel.org/andersson/remoteproc/c/a2d7764b3731
  - [net-next,4/4] net: ipa: support COMPILE_TEST
    https://git.kernel.org/andersson/remoteproc/c/38a4066f593c

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-03-11 23:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-07 23:34 [PATCH net-next 0/4] net: ipa: support COMPILE_TEST Alex Elder
2021-01-07 23:34 ` [PATCH net-next 1/4] remoteproc: qcom: expose types for COMPILE_TEST Alex Elder
2021-01-07 23:34 ` [PATCH net-next 2/4] soc: qcom: mdt_loader: define stubs " Alex Elder
2021-01-07 23:34 ` [PATCH net-next 3/4] net: ipa: declare the page pointer type in "gsi_trans.h" Alex Elder
2021-01-07 23:34 ` [PATCH net-next 4/4] net: ipa: support COMPILE_TEST Alex Elder
2021-01-08  0:25   ` Bjorn Andersson
2021-01-09 21:53 ` [PATCH net-next 0/4] " Jakub Kicinski
2021-03-11 23:32 ` patchwork-bot+linux-remoteproc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).