linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] net: fix net-next
@ 2020-03-12 16:44 Alex Elder
  2020-03-12 16:44 ` [PATCH 1/2] bitfield.h: add FIELD_MAX() and field_max() Alex Elder
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alex Elder @ 2020-03-12 16:44 UTC (permalink / raw)
  To: David Miller, Bjorn Andersson, Andy Gross
  Cc: Rob Herring, Mark Rutland, netdev, devicetree, linux-arm-msm, open list

David:	These patches resolve two issues caused by the IPA driver
	being incorporated into net-next.  I hope you will merge
	them as soon as you can.

The IPA driver was merged into net-next last week, but two problems
arise as a result, affecting net-next and linux-next:
  - The patch that defines field_max() was not incorporated into
    net-next, but is required by the IPA code
  - A patch that updates "sdm845.dtsi" *was* incorporated into
    net-next, but other changes to that file in the Qualcomm
    for-next branch lead to errors

Bjorn has agreed to incorporate the DTS file change into the
Qualcomm tree after it is reverted from net-next.

					-Alex

Alex Elder (2):
  bitfield.h: add FIELD_MAX() and field_max()
  Revert "arm64: dts: sdm845: add IPA information"

 arch/arm64/boot/dts/qcom/sdm845.dtsi | 51 ----------------------------
 include/linux/bitfield.h             | 14 ++++++++
 2 files changed, 14 insertions(+), 51 deletions(-)

-- 
2.20.1


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

* [PATCH 1/2] bitfield.h: add FIELD_MAX() and field_max()
  2020-03-12 16:44 [PATCH 0/2] net: fix net-next Alex Elder
@ 2020-03-12 16:44 ` Alex Elder
  2020-03-12 16:44 ` [PATCH 2/2] Revert "arm64: dts: sdm845: add IPA information" Alex Elder
  2020-03-12 22:48 ` [PATCH 0/2] net: fix net-next David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Alex Elder @ 2020-03-12 16:44 UTC (permalink / raw)
  To: David Miller, Bjorn Andersson, Andy Gross
  Cc: Rob Herring, Mark Rutland, netdev, devicetree, linux-arm-msm,
	open list, Jakub Kicinski

Define FIELD_MAX(), which supplies the maximum value that can be
represented by a field value.  Define field_max() as well, to go
along with the lower-case forms of the field mask functions.

Signed-off-by: Alex Elder <elder@linaro.org>
Acked-by: Jakub Kicinski <kuba@kernel.org>
---
 include/linux/bitfield.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/include/linux/bitfield.h b/include/linux/bitfield.h
index 4bbb5f1c8b5b..48ea093ff04c 100644
--- a/include/linux/bitfield.h
+++ b/include/linux/bitfield.h
@@ -55,6 +55,19 @@
 					      (1ULL << __bf_shf(_mask))); \
 	})
 
+/**
+ * FIELD_MAX() - produce the maximum value representable by a field
+ * @_mask: shifted mask defining the field's length and position
+ *
+ * FIELD_MAX() returns the maximum value that can be held in the field
+ * specified by @_mask.
+ */
+#define FIELD_MAX(_mask)						\
+	({								\
+		__BF_FIELD_CHECK(_mask, 0ULL, 0ULL, "FIELD_MAX: ");	\
+		(typeof(_mask))((_mask) >> __bf_shf(_mask));		\
+	})
+
 /**
  * FIELD_FIT() - check if value fits in the field
  * @_mask: shifted mask defining the field's length and position
@@ -110,6 +123,7 @@ static __always_inline u64 field_mask(u64 field)
 {
 	return field / field_multiplier(field);
 }
+#define field_max(field)	((typeof(field))field_mask(field))
 #define ____MAKE_OP(type,base,to,from)					\
 static __always_inline __##type type##_encode_bits(base v, base field)	\
 {									\
-- 
2.20.1


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

* [PATCH 2/2] Revert "arm64: dts: sdm845: add IPA information"
  2020-03-12 16:44 [PATCH 0/2] net: fix net-next Alex Elder
  2020-03-12 16:44 ` [PATCH 1/2] bitfield.h: add FIELD_MAX() and field_max() Alex Elder
@ 2020-03-12 16:44 ` Alex Elder
  2020-03-12 22:48 ` [PATCH 0/2] net: fix net-next David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Alex Elder @ 2020-03-12 16:44 UTC (permalink / raw)
  To: David Miller, Bjorn Andersson, Andy Gross
  Cc: Rob Herring, Mark Rutland, netdev, devicetree, linux-arm-msm, open list

This reverts commit 9cc5ae125f0eaee471bc87fb5cbf29385fd9272a.

This commit:
  b303f9f0050b arm64: dts: sdm845: Redefine interconnect provider DT nodes
found in the Qualcomm for-next tree removes/redefines the interconnect
provider node(s) used for IPA.  I'm not sure whether it technically
conflicts with the IPA change to "sdm845.dtsi" in for-next, but it renders
it broken.

Revert this commit in the for-next tree, with the plan to incorporate
it into the Qualcomm tree instead.

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

diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 58fd1c611849..d42302b8889b 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -675,17 +675,6 @@
 			interrupt-controller;
 			#interrupt-cells = <2>;
 		};
-
-		ipa_smp2p_out: ipa-ap-to-modem {
-			qcom,entry-name = "ipa";
-			#qcom,smem-state-cells = <1>;
-		};
-
-		ipa_smp2p_in: ipa-modem-to-ap {
-			qcom,entry-name = "ipa";
-			interrupt-controller;
-			#interrupt-cells = <2>;
-		};
 	};
 
 	smp2p-slpi {
@@ -1446,46 +1435,6 @@
 			};
 		};
 
-		ipa@1e40000 {
-			compatible = "qcom,sdm845-ipa";
-
-			modem-init;
-			modem-remoteproc = <&mss_pil>;
-
-			reg = <0 0x1e40000 0 0x7000>,
-			      <0 0x1e47000 0 0x2000>,
-			      <0 0x1e04000 0 0x2c000>;
-			reg-names = "ipa-reg",
-				    "ipa-shared",
-				    "gsi";
-
-			interrupts-extended =
-					<&intc 0 311 IRQ_TYPE_EDGE_RISING>,
-					<&intc 0 432 IRQ_TYPE_LEVEL_HIGH>,
-					<&ipa_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
-					<&ipa_smp2p_in 1 IRQ_TYPE_EDGE_RISING>;
-			interrupt-names = "ipa",
-					  "gsi",
-					  "ipa-clock-query",
-					  "ipa-setup-ready";
-
-			clocks = <&rpmhcc RPMH_IPA_CLK>;
-			clock-names = "core";
-
-			interconnects =
-				<&rsc_hlos MASTER_IPA &rsc_hlos SLAVE_EBI1>,
-				<&rsc_hlos MASTER_IPA &rsc_hlos SLAVE_IMEM>,
-				<&rsc_hlos MASTER_APPSS_PROC &rsc_hlos SLAVE_IPA_CFG>;
-			interconnect-names = "memory",
-					     "imem",
-					     "config";
-
-			qcom,smem-states = <&ipa_smp2p_out 0>,
-					   <&ipa_smp2p_out 1>;
-			qcom,smem-state-names = "ipa-clock-enabled-valid",
-						"ipa-clock-enabled";
-		};
-
 		tcsr_mutex_regs: syscon@1f40000 {
 			compatible = "syscon";
 			reg = <0 0x01f40000 0 0x40000>;
-- 
2.20.1


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

* Re: [PATCH 0/2] net: fix net-next
  2020-03-12 16:44 [PATCH 0/2] net: fix net-next Alex Elder
  2020-03-12 16:44 ` [PATCH 1/2] bitfield.h: add FIELD_MAX() and field_max() Alex Elder
  2020-03-12 16:44 ` [PATCH 2/2] Revert "arm64: dts: sdm845: add IPA information" Alex Elder
@ 2020-03-12 22:48 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2020-03-12 22:48 UTC (permalink / raw)
  To: elder
  Cc: bjorn.andersson, agross, robh+dt, mark.rutland, netdev,
	devicetree, linux-arm-msm, linux-kernel

From: Alex Elder <elder@linaro.org>
Date: Thu, 12 Mar 2020 11:44:26 -0500

> David:	These patches resolve two issues caused by the IPA driver
> 	being incorporated into net-next.  I hope you will merge
> 	them as soon as you can.
> 
> The IPA driver was merged into net-next last week, but two problems
> arise as a result, affecting net-next and linux-next:
>   - The patch that defines field_max() was not incorporated into
>     net-next, but is required by the IPA code
>   - A patch that updates "sdm845.dtsi" *was* incorporated into
>     net-next, but other changes to that file in the Qualcomm
>     for-next branch lead to errors
> 
> Bjorn has agreed to incorporate the DTS file change into the
> Qualcomm tree after it is reverted from net-next.

Series applied, thanks Alex.

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

end of thread, other threads:[~2020-03-12 22:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-12 16:44 [PATCH 0/2] net: fix net-next Alex Elder
2020-03-12 16:44 ` [PATCH 1/2] bitfield.h: add FIELD_MAX() and field_max() Alex Elder
2020-03-12 16:44 ` [PATCH 2/2] Revert "arm64: dts: sdm845: add IPA information" Alex Elder
2020-03-12 22:48 ` [PATCH 0/2] net: fix net-next David Miller

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).