2024-05-08 01:32:03

by Sagar Cheluvegowda

[permalink] [raw]
Subject: [PATCH v3 0/2] Mark Ethernet devices on sa8775p as DMA-coherent

To: Bjorn Andersson <[email protected]>
To: Konrad Dybcio <[email protected]>
To: Rob Herring <[email protected]>
To: Krzysztof Kozlowski <[email protected]>
To: Conor Dooley <[email protected]>
To: Bartosz Golaszewski <[email protected]>
To: Andrew Halaney <[email protected]>
To: Vinod Koul <[email protected]>
To: David S. Miller <[email protected]>
To: Eric Dumazet <[email protected]>
To: Jakub Kicinski <[email protected]>
To: Paolo Abeni <[email protected]>
To: Bhupesh Sharma <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

Patch 1 :- This patch marks Ethernet devices on Sa8775p as DMA-coherent
as both the devices are cache coherent.

Patch 2 :- Update the schema of qcom,ethqos to allow specifying Ethernet
devices as "dma-coherent".

Changes in v3:
Update the schema to specify Ethernet devices as "dma-coherent".
- Link: https://lore.kernel.org/r/20240425-mark_ethernet_devices_dma_coherent-v1-1-ad0755044e26@quicinc.com

Changes in v2:
Remove internal change-id from commit message
- Link to v1: https://lore.kernel.org/r/20240425-mark_ethernet_devices_dma_coherent-v1-1-ad0755044e26@quicinc.com

---
---
Sagar Cheluvegowda (2):
arm64: dts: qcom: sa8775p: mark ethernet devices as DMA-coherent
dt-bindings: net: qcom: ethernet: Allow dma-coherent

Documentation/devicetree/bindings/net/qcom,ethqos.yaml | 2 ++
arch/arm64/boot/dts/qcom/sa8775p.dtsi | 2 ++
2 files changed, 4 insertions(+)
---
base-commit: a93289b830ce783955b22fbe5d1274a464c05acf
change-id: 20240425-mark_ethernet_devices_dma_coherent-6c6154b84165

Best regards,
--
Sagar Cheluvegowda <[email protected]>



2024-05-08 01:32:05

by Sagar Cheluvegowda

[permalink] [raw]
Subject: [PATCH v3 1/2] arm64: dts: qcom: sa8775p: mark ethernet devices as DMA-coherent

Ethernet devices are cache coherent, mark it as such in the dtsi.

Fixes: ff499a0fbb23 ("arm64: dts: qcom: sa8775p: add the first 1Gb ethernet interface")
Fixes: e952348a7cc7 ("arm64: dts: qcom: sa8775p: add a node for EMAC1")
Signed-off-by: Sagar Cheluvegowda <[email protected]>
---
arch/arm64/boot/dts/qcom/sa8775p.dtsi | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
index 231cea1f0fa8..5ab4ca978837 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi
+++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
@@ -2504,6 +2504,7 @@ ethernet1: ethernet@23000000 {
phy-names = "serdes";

iommus = <&apps_smmu 0x140 0xf>;
+ dma-coherent;

snps,tso;
snps,pbl = <32>;
@@ -2538,6 +2539,7 @@ ethernet0: ethernet@23040000 {
phy-names = "serdes";

iommus = <&apps_smmu 0x120 0xf>;
+ dma-coherent;

snps,tso;
snps,pbl = <32>;

--
2.34.1


2024-05-08 01:32:06

by Sagar Cheluvegowda

[permalink] [raw]
Subject: [PATCH v3 2/2] dt-bindings: net: qcom: ethernet: Allow dma-coherent

On SA8775P, Ethernet DMA controller is coherent with the CPU.
allow specifying that.

Signed-off-by: Sagar Cheluvegowda <[email protected]>
---
Documentation/devicetree/bindings/net/qcom,ethqos.yaml | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/qcom,ethqos.yaml b/Documentation/devicetree/bindings/net/qcom,ethqos.yaml
index 69a337c7e345..44028987ef92 100644
--- a/Documentation/devicetree/bindings/net/qcom,ethqos.yaml
+++ b/Documentation/devicetree/bindings/net/qcom,ethqos.yaml
@@ -66,6 +66,8 @@ properties:
phy-names:
const: serdes

+ dma-coherent: true
+
required:
- compatible
- clocks

--
2.34.1


2024-05-08 07:01:23

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v3 2/2] dt-bindings: net: qcom: ethernet: Allow dma-coherent

On 08/05/2024 03:31, Sagar Cheluvegowda wrote:
> On SA8775P, Ethernet DMA controller is coherent with the CPU.
> allow specifying that.
>
> Signed-off-by: Sagar Cheluvegowda <[email protected]>
> ---
> Documentation/devicetree/bindings/net/qcom,ethqos.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/net/qcom,ethqos.yaml b/Documentation/devicetree/bindings/net/qcom,ethqos.yaml
> index 69a337c7e345..44028987ef92 100644
> --- a/Documentation/devicetree/bindings/net/qcom,ethqos.yaml
> +++ b/Documentation/devicetree/bindings/net/qcom,ethqos.yaml
> @@ -66,6 +66,8 @@ properties:
> phy-names:
> const: serdes
>
> + dma-coherent: true

Do not add properties to the end of the list. That's downstream
practice... Keep it next to iommus, for example.

Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2024-05-08 18:45:27

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v3 0/2] Mark Ethernet devices on sa8775p as DMA-coherent



On 5/8/24 03:30, Sagar Cheluvegowda wrote:
> To: Bjorn Andersson <[email protected]>
> To: Konrad Dybcio <[email protected]>
> To: Rob Herring <[email protected]>
> To: Krzysztof Kozlowski <[email protected]>
> To: Conor Dooley <[email protected]>
> To: Bartosz Golaszewski <[email protected]>
> To: Andrew Halaney <[email protected]>
> To: Vinod Koul <[email protected]>
> To: David S. Miller <[email protected]>
> To: Eric Dumazet <[email protected]>
> To: Jakub Kicinski <[email protected]>
> To: Paolo Abeni <[email protected]>
> To: Bhupesh Sharma <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
>
> Patch 1 :- This patch marks Ethernet devices on Sa8775p as DMA-coherent
> as both the devices are cache coherent.
>
> Patch 2 :- Update the schema of qcom,ethqos to allow specifying Ethernet
> devices as "dma-coherent".
Per-patch descriptions like this are usually redundant, unless you're
reworking something complex and non-obvious. These things above, we
can infer from the commit titles alone.

Generally, when there's not much to say in the cover letter, you can just
give a very brief summary like "This series fixes X on Y".

Not a huge deal though.

Konrad

2024-05-08 18:53:43

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] arm64: dts: qcom: sa8775p: mark ethernet devices as DMA-coherent



On 5/8/24 03:31, Sagar Cheluvegowda wrote:
> Ethernet devices are cache coherent, mark it as such in the dtsi.
>
> Fixes: ff499a0fbb23 ("arm64: dts: qcom: sa8775p: add the first 1Gb ethernet interface")
> Fixes: e952348a7cc7 ("arm64: dts: qcom: sa8775p: add a node for EMAC1")
> Signed-off-by: Sagar Cheluvegowda <[email protected]>
> ---

Reviewed-by: Konrad Dybcio <[email protected]>

Konrad

2024-05-14 14:21:39

by Andrew Halaney

[permalink] [raw]
Subject: Re: [PATCH v3 0/2] Mark Ethernet devices on sa8775p as DMA-coherent

On Tue, May 07, 2024 at 06:30:59PM GMT, Sagar Cheluvegowda wrote:
> To: Bjorn Andersson <[email protected]>
> To: Konrad Dybcio <[email protected]>
> To: Rob Herring <[email protected]>
> To: Krzysztof Kozlowski <[email protected]>
> To: Conor Dooley <[email protected]>
> To: Bartosz Golaszewski <[email protected]>
> To: Andrew Halaney <[email protected]>
> To: Vinod Koul <[email protected]>
> To: David S. Miller <[email protected]>
> To: Eric Dumazet <[email protected]>
> To: Jakub Kicinski <[email protected]>
> To: Paolo Abeni <[email protected]>
> To: Bhupesh Sharma <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
>
> Patch 1 :- This patch marks Ethernet devices on Sa8775p as DMA-coherent
> as both the devices are cache coherent.
>
> Patch 2 :- Update the schema of qcom,ethqos to allow specifying Ethernet
> devices as "dma-coherent".

I've been keeping my eye on this series, and realized that I should know
better (but don't). How can I tell what tree these should go through?

Just trolling through the list, it seems dt-bindings go through netdev,
whereas dts changes go through the Qualcomm tree.

Is there something in the get_maintainers.pl output that I should be
interpreting differently to understand what patch should target what
maintainer tree?

halaney@x1gen2nano ~/git/linux-next (git)-[remotes/net/main] % ./scripts/get_maintainer.pl Documentation/devicetree/bindings/net/qcom,ethqos.yaml :(
Vinod Koul <[email protected]> (maintainer:QUALCOMM ETHQOS ETHERNET DRIVER)
Bjorn Andersson <[email protected]> (maintainer:ARM/QUALCOMM SUPPORT)
Konrad Dybcio <[email protected]> (maintainer:ARM/QUALCOMM SUPPORT)
"David S. Miller" <[email protected]> (maintainer:NETWORKING DRIVERS)
Eric Dumazet <[email protected]> (maintainer:NETWORKING DRIVERS)
Jakub Kicinski <[email protected]> (maintainer:NETWORKING DRIVERS)
Paolo Abeni <[email protected]> (maintainer:NETWORKING DRIVERS)
Rob Herring <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
Krzysztof Kozlowski <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
Conor Dooley <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
Bhupesh Sharma <[email protected]> (in file)
[email protected] (open list:QUALCOMM ETHQOS ETHERNET DRIVER)
[email protected] (open list:QUALCOMM ETHQOS ETHERNET DRIVER)
[email protected] (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
[email protected] (open list)

I don't know how to figure out who takes this patch in the end based on
the output above :)

ahalaney@x1gen2nano ~/git/linux-next (git)-[remotes/net/main] % ./scripts/get_maintainer.pl arch/arm64/boot/dts/qcom/sa8775p.dtsi
Bjorn Andersson <[email protected]> (maintainer:ARM/QUALCOMM SUPPORT)
Konrad Dybcio <[email protected]> (maintainer:ARM/QUALCOMM SUPPORT)
Rob Herring <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
Krzysztof Kozlowski <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
Conor Dooley <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
[email protected] (open list:ARM/QUALCOMM SUPPORT)
[email protected] (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
[email protected] (open list)
ahalaney@x1gen2nano ~/git/linux-next (git)-[remotes/net/main] %

This one's a little more obviously Qualcomm specific.. but yeah. Sorry
for the obvious question, was talking to Sagar offline and realized I
didn't have a good way to tell him how to figure that out other than dig
through lkml, so just asking directly here!

Thanks,
Andrew


2024-05-14 14:41:55

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [PATCH v3 0/2] Mark Ethernet devices on sa8775p as DMA-coherent

On Tue, 14 May 2024 09:21:08 -0500 Andrew Halaney wrote:
> I don't know how to figure out who takes this patch in the end based on
> the output above :)

bindings/net is usually going via netdev, but my reading of Krzysztof's
comment was that there will be a v4...

2024-05-14 15:12:46

by Andrew Halaney

[permalink] [raw]
Subject: Re: [PATCH v3 0/2] Mark Ethernet devices on sa8775p as DMA-coherent

On Tue, May 14, 2024 at 07:41:42AM GMT, Jakub Kicinski wrote:
> On Tue, 14 May 2024 09:21:08 -0500 Andrew Halaney wrote:
> > I don't know how to figure out who takes this patch in the end based on
> > the output above :)
>
> bindings/net is usually going via netdev, but my reading of Krzysztof's
> comment was that there will be a v4...
>

Ahh, I read that differently. I'll ask Sagar to respin with that comment
taken into consideration!

But ignoring that, let me know if there's a good way to know who really
picks things up outside of experience contributing. It's Sagar's first
submission upstream, etc, so I've been fielding some first time
contribution questions and realized I didn't have a good answer to that
other than troll through lkml or the git log and see who picked those up
in the past!

Thanks,
Andrew


2024-05-14 16:06:35

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [PATCH v3 0/2] Mark Ethernet devices on sa8775p as DMA-coherent

On Tue, 14 May 2024 10:11:35 -0500 Andrew Halaney wrote:
> But ignoring that, let me know if there's a good way to know who really
> picks things up outside of experience contributing. It's Sagar's first
> submission upstream, etc, so I've been fielding some first time
> contribution questions and realized I didn't have a good answer to that
> other than troll through lkml or the git log and see who picked those up
> in the past!

I'm not sure how well define it is to be honest. MAINTAINERS is focused
a bit too much on CCing people rather than code flow. Which hurts us in
more than one way. I _think_ the right way to find the responsible tree
is to do an longest prefix match on the path in MAINTAINERS, looking
just at the entries which have a T: attribute. (Q: attribute for that
entry may also be useful.) In practice I myself usually look at:

git log --format=committer -- $path

where:

[pretty]
committer = %<(20)%cn %cs %<(47,trunc)%s