All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 net-next 0/4] net: ipa: remove a build dependency
@ 2021-01-20 21:26 Alex Elder
  2021-01-20 21:26 ` [PATCH v3 net-next 1/4] net: ipa: remove a remoteproc dependency Alex Elder
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Alex Elder @ 2021-01-20 21:26 UTC (permalink / raw)
  To: davem, kuba
  Cc: elder, bjorn.andersson, agross, evgreen, cpratapa, subashab,
	robh+dt, rdunlap, netdev, linux-arm-msm, linux-kernel,
	devicetree

(David/Jakub, please take these all through net-next if they are
acceptable to you, once Rob has acked the binding.  Rob, please ack
if the binding looks OK to you.)

Version 3 removes the "Fixes" tag from the first patch, and updates
the addressee list to include some people I apparently missed.

Version 2 includes <.../arm-gic.h> rather than <.../irq.h> in the
example section of the DT binding, to ensure GIC_SPI is defined.
I verified this passes "make dt_bindings_check".

The rest of the series is unchanged.  Below is the original cover
letter.

---

Unlike the original (temporary) IPA notification mechanism, the
generic remoteproc SSR notification code does not require the IPA
driver to maintain a pointer to the modem subsystem remoteproc
structure.

The IPA driver was converted to use the newer SSR notifiers, but the
specification and use of a phandle for the modem subsystem was never
removed.

This series removes the lookup of the remoteproc pointer, and that
removes the need for the modem DT property.  It also removes the
reference to the "modem-remoteproc" property from the DT binding,
and from the DT files that specified them.

David/Jakub, please take these all through net-next if they are
acceptable to you, once Rob has acked the binding and DT patches.

Thanks.

					-Alex

Alex Elder (4):
  net: ipa: remove a remoteproc dependency
  dt-bindings: net: remove modem-remoteproc property
  arm64: dts: qcom: sc7180: kill IPA modem-remoteproc property
  arm64: dts: qcom: sdm845: kill IPA modem-remoteproc property

 .../devicetree/bindings/net/qcom,ipa.yaml     | 15 ++------
 arch/arm64/boot/dts/qcom/sc7180.dtsi          |  2 -
 arch/arm64/boot/dts/qcom/sdm845.dtsi          |  2 -
 drivers/net/ipa/ipa.h                         |  2 -
 drivers/net/ipa/ipa_main.c                    | 38 +------------------
 5 files changed, 5 insertions(+), 54 deletions(-)

-- 
2.20.1


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

* [PATCH v3 net-next 1/4] net: ipa: remove a remoteproc dependency
  2021-01-20 21:26 [PATCH v3 net-next 0/4] net: ipa: remove a build dependency Alex Elder
@ 2021-01-20 21:26 ` Alex Elder
  2021-01-20 21:26 ` [PATCH v3 net-next 2/4] dt-bindings: net: remove modem-remoteproc property Alex Elder
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Alex Elder @ 2021-01-20 21:26 UTC (permalink / raw)
  To: davem, kuba
  Cc: elder, bjorn.andersson, agross, evgreen, cpratapa, subashab,
	robh+dt, rdunlap, netdev, linux-arm-msm, linux-kernel,
	devicetree

The IPA driver currently requires a DT property to be defined whose
value is the phandle for the modem subsystem.  This was needed to
look up a remoteproc structure pointer used when registering for
notifications in the original IPA notification mechanism.

Remoteproc provides a more generic SSR notifier system, and the IPA
driver switched over to it last summer, but this remoteproc phandle
dependency was not removed at that time.

Get rid of the IPA remoteproc pointer and stop requiring the phandle
be specified.

This avoids a link error (rproc_put() not defined) for certain
configurations.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Alex Elder <elder@linaro.org>
---
 drivers/net/ipa/ipa.h      |  2 --
 drivers/net/ipa/ipa_main.c | 38 ++------------------------------------
 2 files changed, 2 insertions(+), 38 deletions(-)

diff --git a/drivers/net/ipa/ipa.h b/drivers/net/ipa/ipa.h
index 6c2371084c55a..c6c6a7f6909c1 100644
--- a/drivers/net/ipa/ipa.h
+++ b/drivers/net/ipa/ipa.h
@@ -43,7 +43,6 @@ enum ipa_flag {
  * @flags:		Boolean state flags
  * @version:		IPA hardware version
  * @pdev:		Platform device
- * @modem_rproc:	Remoteproc handle for modem subsystem
  * @smp2p:		SMP2P information
  * @clock:		IPA clocking information
  * @table_addr:		DMA address of filter/route table content
@@ -83,7 +82,6 @@ struct ipa {
 	DECLARE_BITMAP(flags, IPA_FLAG_COUNT);
 	enum ipa_version version;
 	struct platform_device *pdev;
-	struct rproc *modem_rproc;
 	struct notifier_block nb;
 	void *notifier;
 	struct ipa_smp2p *smp2p;
diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c
index 84bb8ae927252..ab0fd5cb49277 100644
--- a/drivers/net/ipa/ipa_main.c
+++ b/drivers/net/ipa/ipa_main.c
@@ -15,7 +15,6 @@
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/of_address.h>
-#include <linux/remoteproc.h>
 #include <linux/qcom_scm.h>
 #include <linux/soc/qcom/mdt_loader.h>
 
@@ -729,19 +728,6 @@ static const struct of_device_id ipa_match[] = {
 };
 MODULE_DEVICE_TABLE(of, ipa_match);
 
-static phandle of_property_read_phandle(const struct device_node *np,
-					const char *name)
-{
-        struct property *prop;
-        int len = 0;
-
-        prop = of_find_property(np, name, &len);
-        if (!prop || len != sizeof(__be32))
-                return 0;
-
-        return be32_to_cpup(prop->value);
-}
-
 /* Check things that can be validated at build time.  This just
  * groups these things BUILD_BUG_ON() calls don't clutter the rest
  * of the code.
@@ -807,10 +793,8 @@ static int ipa_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	const struct ipa_data *data;
 	struct ipa_clock *clock;
-	struct rproc *rproc;
 	bool modem_init;
 	struct ipa *ipa;
-	phandle ph;
 	int ret;
 
 	ipa_validate_build();
@@ -829,25 +813,12 @@ static int ipa_probe(struct platform_device *pdev)
 		if (!qcom_scm_is_available())
 			return -EPROBE_DEFER;
 
-	/* We rely on remoteproc to tell us about modem state changes */
-	ph = of_property_read_phandle(dev->of_node, "modem-remoteproc");
-	if (!ph) {
-		dev_err(dev, "DT missing \"modem-remoteproc\" property\n");
-		return -EINVAL;
-	}
-
-	rproc = rproc_get_by_phandle(ph);
-	if (!rproc)
-		return -EPROBE_DEFER;
-
 	/* The clock and interconnects might not be ready when we're
 	 * probed, so might return -EPROBE_DEFER.
 	 */
 	clock = ipa_clock_init(dev, data->clock_data);
-	if (IS_ERR(clock)) {
-		ret = PTR_ERR(clock);
-		goto err_rproc_put;
-	}
+	if (IS_ERR(clock))
+		return PTR_ERR(clock);
 
 	/* No more EPROBE_DEFER.  Allocate and initialize the IPA structure */
 	ipa = kzalloc(sizeof(*ipa), GFP_KERNEL);
@@ -858,7 +829,6 @@ static int ipa_probe(struct platform_device *pdev)
 
 	ipa->pdev = pdev;
 	dev_set_drvdata(dev, ipa);
-	ipa->modem_rproc = rproc;
 	ipa->clock = clock;
 	ipa->version = data->version;
 
@@ -935,8 +905,6 @@ static int ipa_probe(struct platform_device *pdev)
 	kfree(ipa);
 err_clock_exit:
 	ipa_clock_exit(clock);
-err_rproc_put:
-	rproc_put(rproc);
 
 	return ret;
 }
@@ -944,7 +912,6 @@ static int ipa_probe(struct platform_device *pdev)
 static int ipa_remove(struct platform_device *pdev)
 {
 	struct ipa *ipa = dev_get_drvdata(&pdev->dev);
-	struct rproc *rproc = ipa->modem_rproc;
 	struct ipa_clock *clock = ipa->clock;
 	int ret;
 
@@ -970,7 +937,6 @@ static int ipa_remove(struct platform_device *pdev)
 	ipa_reg_exit(ipa);
 	kfree(ipa);
 	ipa_clock_exit(clock);
-	rproc_put(rproc);
 
 	return 0;
 }
-- 
2.20.1


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

* [PATCH v3 net-next 2/4] dt-bindings: net: remove modem-remoteproc property
  2021-01-20 21:26 [PATCH v3 net-next 0/4] net: ipa: remove a build dependency Alex Elder
  2021-01-20 21:26 ` [PATCH v3 net-next 1/4] net: ipa: remove a remoteproc dependency Alex Elder
@ 2021-01-20 21:26 ` Alex Elder
  2021-01-20 21:26 ` [PATCH v3 net-next 3/4] arm64: dts: qcom: sc7180: kill IPA " Alex Elder
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Alex Elder @ 2021-01-20 21:26 UTC (permalink / raw)
  To: robh+dt, davem, kuba
  Cc: bjorn.andersson, agross, evgreen, cpratapa, subashab, rdunlap,
	netdev, linux-arm-msm, linux-kernel, devicetree

The IPA driver uses the remoteproc SSR notifier now, rather than the
temporary IPA notification system used initially.  As a result it no
longer needs a property identifying the modem subsystem DT node.

Use GIC_SPI rather than 0 in the example interrupt definition.

Signed-off-by: Alex Elder <elder@linaro.org>
---
 .../devicetree/bindings/net/qcom,ipa.yaml         | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/qcom,ipa.yaml b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
index 8a2d12644675b..8f86084bf12e9 100644
--- a/Documentation/devicetree/bindings/net/qcom,ipa.yaml
+++ b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
@@ -113,13 +113,6 @@ properties:
       performing early IPA initialization, including loading and
       validating firwmare used by the GSI.
 
-  modem-remoteproc:
-    $ref: /schemas/types.yaml#/definitions/phandle
-    description:
-      This defines the phandle to the remoteproc node representing
-      the modem subsystem.  This is requied so the IPA driver can
-      receive and act on notifications of modem up/down events.
-
   memory-region:
     maxItems: 1
     description:
@@ -135,7 +128,6 @@ required:
   - interrupts
   - interconnects
   - qcom,smem-states
-  - modem-remoteproc
 
 oneOf:
   - required:
@@ -147,7 +139,7 @@ additionalProperties: false
 
 examples:
   - |
-        #include <dt-bindings/interrupt-controller/irq.h>
+        #include <dt-bindings/interrupt-controller/arm-gic.h>
         #include <dt-bindings/clock/qcom,rpmh.h>
         #include <dt-bindings/interconnect/qcom,sdm845.h>
 
@@ -168,7 +160,6 @@ examples:
                 compatible = "qcom,sdm845-ipa";
 
                 modem-init;
-                modem-remoteproc = <&mss_pil>;
 
                 iommus = <&apps_smmu 0x720 0x3>;
                 reg = <0x1e40000 0x7000>,
@@ -178,8 +169,8 @@ examples:
                             "ipa-shared",
                             "gsi";
 
-                interrupts-extended = <&intc 0 311 IRQ_TYPE_EDGE_RISING>,
-                                      <&intc 0 432 IRQ_TYPE_LEVEL_HIGH>,
+                interrupts-extended = <&intc GIC_SPI 311 IRQ_TYPE_EDGE_RISING>,
+                                      <&intc GIC_SPI 432 IRQ_TYPE_LEVEL_HIGH>,
                                       <&ipa_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
                                       <&ipa_smp2p_in 1 IRQ_TYPE_EDGE_RISING>;
                 interrupt-names = "ipa",
-- 
2.20.1


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

* [PATCH v3 net-next 3/4] arm64: dts: qcom: sc7180: kill IPA modem-remoteproc property
  2021-01-20 21:26 [PATCH v3 net-next 0/4] net: ipa: remove a build dependency Alex Elder
  2021-01-20 21:26 ` [PATCH v3 net-next 1/4] net: ipa: remove a remoteproc dependency Alex Elder
  2021-01-20 21:26 ` [PATCH v3 net-next 2/4] dt-bindings: net: remove modem-remoteproc property Alex Elder
@ 2021-01-20 21:26 ` Alex Elder
  2021-01-20 21:26 ` [PATCH v3 net-next 4/4] arm64: dts: qcom: sdm845: " Alex Elder
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Alex Elder @ 2021-01-20 21:26 UTC (permalink / raw)
  To: davem, kuba, bjorn.andersson, agross
  Cc: robh+dt, evgreen, cpratapa, subashab, rdunlap, netdev,
	linux-arm-msm, linux-kernel, devicetree

The "modem-remoteproc" property is no longer required for the IPA
driver, so get rid of it.

Signed-off-by: Alex Elder <elder@linaro.org>
---
 arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index 22b832fc62e3d..003309f0d3e18 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -1434,8 +1434,6 @@
 			qcom,smem-state-names = "ipa-clock-enabled-valid",
 						"ipa-clock-enabled";
 
-			modem-remoteproc = <&remoteproc_mpss>;
-
 			status = "disabled";
 		};
 
-- 
2.20.1


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

* [PATCH v3 net-next 4/4] arm64: dts: qcom: sdm845: kill IPA modem-remoteproc property
  2021-01-20 21:26 [PATCH v3 net-next 0/4] net: ipa: remove a build dependency Alex Elder
                   ` (2 preceding siblings ...)
  2021-01-20 21:26 ` [PATCH v3 net-next 3/4] arm64: dts: qcom: sc7180: kill IPA " Alex Elder
@ 2021-01-20 21:26 ` Alex Elder
  2021-01-21  5:33 ` [PATCH v3 net-next 0/4] net: ipa: remove a build dependency Jakub Kicinski
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Alex Elder @ 2021-01-20 21:26 UTC (permalink / raw)
  To: davem, kuba, bjorn.andersson, agross
  Cc: robh+dt, evgreen, cpratapa, subashab, rdunlap, netdev,
	linux-arm-msm, linux-kernel, devicetree

The "modem-remoteproc" property is no longer required for the IPA
driver, so get rid of it.

Signed-off-by: Alex Elder <elder@linaro.org>
---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index bcf888381f144..04b2490eec9f4 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -2366,8 +2366,6 @@
 			qcom,smem-state-names = "ipa-clock-enabled-valid",
 						"ipa-clock-enabled";
 
-			modem-remoteproc = <&mss_pil>;
-
 			status = "disabled";
 		};
 
-- 
2.20.1


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

* Re: [PATCH v3 net-next 0/4] net: ipa: remove a build dependency
  2021-01-20 21:26 [PATCH v3 net-next 0/4] net: ipa: remove a build dependency Alex Elder
                   ` (3 preceding siblings ...)
  2021-01-20 21:26 ` [PATCH v3 net-next 4/4] arm64: dts: qcom: sdm845: " Alex Elder
@ 2021-01-21  5:33 ` Jakub Kicinski
  2021-01-23  2:10 ` patchwork-bot+netdevbpf
  2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
  6 siblings, 0 replies; 8+ messages in thread
From: Jakub Kicinski @ 2021-01-21  5:33 UTC (permalink / raw)
  To: Alex Elder
  Cc: davem, elder, bjorn.andersson, agross, evgreen, cpratapa,
	subashab, robh+dt, rdunlap, netdev, linux-arm-msm, linux-kernel,
	devicetree

On Wed, 20 Jan 2021 15:26:02 -0600 Alex Elder wrote:
> (David/Jakub, please take these all through net-next if they are
> acceptable to you, once Rob has acked the binding.  Rob, please ack
> if the binding looks OK to you.)
> 
> Version 3 removes the "Fixes" tag from the first patch, and updates
> the addressee list to include some people I apparently missed.
> 
> Version 2 includes <.../arm-gic.h> rather than <.../irq.h> in the
> example section of the DT binding, to ensure GIC_SPI is defined.
> I verified this passes "make dt_bindings_check".
> 
> The rest of the series is unchanged.  Below is the original cover
> letter.

Hi!

Looks like this series has been impacted by vger's flakiness [1], if 
it doesn't get through and have patchwork checks run within 24 hours,
could you repost?

[1] https://patchwork.kernel.org/project/netdevbpf/list/?series=418685

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

* Re: [PATCH v3 net-next 0/4] net: ipa: remove a build dependency
  2021-01-20 21:26 [PATCH v3 net-next 0/4] net: ipa: remove a build dependency Alex Elder
                   ` (4 preceding siblings ...)
  2021-01-21  5:33 ` [PATCH v3 net-next 0/4] net: ipa: remove a build dependency Jakub Kicinski
@ 2021-01-23  2:10 ` patchwork-bot+netdevbpf
  2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
  6 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-01-23  2:10 UTC (permalink / raw)
  To: Alex Elder
  Cc: davem, kuba, elder, bjorn.andersson, agross, evgreen, cpratapa,
	subashab, robh+dt, rdunlap, netdev, linux-arm-msm, linux-kernel,
	devicetree

Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

On Wed, 20 Jan 2021 15:26:02 -0600 you wrote:
> (David/Jakub, please take these all through net-next if they are
> acceptable to you, once Rob has acked the binding.  Rob, please ack
> if the binding looks OK to you.)
> 
> Version 3 removes the "Fixes" tag from the first patch, and updates
> the addressee list to include some people I apparently missed.
> 
> [...]

Here is the summary with links:
  - [v3,net-next,1/4] net: ipa: remove a remoteproc dependency
    https://git.kernel.org/netdev/net-next/c/86fdf1fc60e9
  - [v3,net-next,2/4] dt-bindings: net: remove modem-remoteproc property
    https://git.kernel.org/netdev/net-next/c/27bb36ed7775
  - [v3,net-next,3/4] arm64: dts: qcom: sc7180: kill IPA modem-remoteproc property
    https://git.kernel.org/netdev/net-next/c/8535c8e30010
  - [v3,net-next,4/4] arm64: dts: qcom: sdm845: kill IPA modem-remoteproc property
    https://git.kernel.org/netdev/net-next/c/5da1fca9eb73

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

* Re: [PATCH v3 net-next 0/4] net: ipa: remove a build dependency
  2021-01-20 21:26 [PATCH v3 net-next 0/4] net: ipa: remove a build dependency Alex Elder
                   ` (5 preceding siblings ...)
  2021-01-23  2:10 ` patchwork-bot+netdevbpf
@ 2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
  6 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2021-03-01 19:59 UTC (permalink / raw)
  To: Alex Elder; +Cc: linux-arm-msm

Hello:

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

On Wed, 20 Jan 2021 15:26:02 -0600 you wrote:
> (David/Jakub, please take these all through net-next if they are
> acceptable to you, once Rob has acked the binding.  Rob, please ack
> if the binding looks OK to you.)
> 
> Version 3 removes the "Fixes" tag from the first patch, and updates
> the addressee list to include some people I apparently missed.
> 
> [...]

Here is the summary with links:
  - [v3,net-next,1/4] net: ipa: remove a remoteproc dependency
    https://git.kernel.org/qcom/c/86fdf1fc60e9
  - [v3,net-next,2/4] dt-bindings: net: remove modem-remoteproc property
    https://git.kernel.org/qcom/c/27bb36ed7775
  - [v3,net-next,3/4] arm64: dts: qcom: sc7180: kill IPA modem-remoteproc property
    https://git.kernel.org/qcom/c/8535c8e30010
  - [v3,net-next,4/4] arm64: dts: qcom: sdm845: kill IPA modem-remoteproc property
    https://git.kernel.org/qcom/c/5da1fca9eb73

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-01 20:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20 21:26 [PATCH v3 net-next 0/4] net: ipa: remove a build dependency Alex Elder
2021-01-20 21:26 ` [PATCH v3 net-next 1/4] net: ipa: remove a remoteproc dependency Alex Elder
2021-01-20 21:26 ` [PATCH v3 net-next 2/4] dt-bindings: net: remove modem-remoteproc property Alex Elder
2021-01-20 21:26 ` [PATCH v3 net-next 3/4] arm64: dts: qcom: sc7180: kill IPA " Alex Elder
2021-01-20 21:26 ` [PATCH v3 net-next 4/4] arm64: dts: qcom: sdm845: " Alex Elder
2021-01-21  5:33 ` [PATCH v3 net-next 0/4] net: ipa: remove a build dependency Jakub Kicinski
2021-01-23  2:10 ` patchwork-bot+netdevbpf
2021-03-01 19:59 ` patchwork-bot+linux-arm-msm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.