diff options
author | David S. Miller <davem@davemloft.net> | 2020-03-12 15:48:37 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-12 15:48:37 -0700 |
commit | 0f70eedc0f770af21571eff340bf388a1b4f3744 (patch) | |
tree | 9b0251d090f8ba3f365a3069a1490c5a1f8c0a7c | |
parent | 82a9822b26770b3965790f6a2340f0341a9bc102 (diff) | |
parent | 4639b38b720913ef01e4ea1b20d7615af2d45d70 (diff) |
Merge branch 'ipa-fixes'
Alex Elder says:
====================
net: fix net-next
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.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | arch/arm64/boot/dts/qcom/sdm845.dtsi | 51 | ||||
-rw-r--r-- | include/linux/bitfield.h | 14 |
2 files changed, 14 insertions, 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>; 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 @@ -56,6 +56,19 @@ }) /** + * 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 * @_val: value to test against the field @@ -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) \ { \ |