linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V1] arm64:dts:qcom:sc7280: mark memory of PCIe as cache coherent
@ 2023-02-27  9:36 Krishna chaitanya chundru
  2023-02-27 13:32 ` Manivannan Sadhasivam
  0 siblings, 1 reply; 2+ messages in thread
From: Krishna chaitanya chundru @ 2023-02-27  9:36 UTC (permalink / raw)
  To: helgaas
  Cc: linux-pci, linux-arm-msm, linux-kernel, mka, quic_vbadigan,
	quic_hemantk, quic_nitegupt, quic_skananth, quic_ramkri,
	manivannan.sadhasivam, swboyd, dmitry.baryshkov, svarbanov,
	agross, andersson, konrad.dybcio, lpieralisi, robh, kw, bhelgaas,
	linux-phy, vkoul, kishon, mturquette, linux-clk,
	Krishna chaitanya chundru, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

Mark the PCIe node as dma-coherent as the devices on PCIe bus are
cache coherent.

Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com>
---
 arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index bdcb749..8f4ab6b 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -2131,6 +2131,8 @@
 			pinctrl-names = "default";
 			pinctrl-0 = <&pcie1_clkreq_n>;
 
+			dma-coherent;
+
 			iommus = <&apps_smmu 0x1c80 0x1>;
 
 			iommu-map = <0x0 &apps_smmu 0x1c80 0x1>,
-- 
2.7.4


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

* Re: [PATCH V1] arm64:dts:qcom:sc7280: mark memory of PCIe as cache coherent
  2023-02-27  9:36 [PATCH V1] arm64:dts:qcom:sc7280: mark memory of PCIe as cache coherent Krishna chaitanya chundru
@ 2023-02-27 13:32 ` Manivannan Sadhasivam
  0 siblings, 0 replies; 2+ messages in thread
From: Manivannan Sadhasivam @ 2023-02-27 13:32 UTC (permalink / raw)
  To: Krishna chaitanya chundru
  Cc: helgaas, linux-pci, linux-arm-msm, linux-kernel, mka,
	quic_vbadigan, quic_hemantk, quic_nitegupt, quic_skananth,
	quic_ramkri, swboyd, dmitry.baryshkov, svarbanov, agross,
	andersson, konrad.dybcio, lpieralisi, robh, kw, bhelgaas,
	linux-phy, vkoul, kishon, mturquette, linux-clk, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

Please fix the subject as:

arm64: dts: qcom: sc7280: Mark PCIe controller as cache coherent

On Mon, Feb 27, 2023 at 03:06:15PM +0530, Krishna chaitanya chundru wrote:
> Mark the PCIe node as dma-coherent as the devices on PCIe bus are
> cache coherent.
> 

But this is a bug fix actually. If the controller is not marked as cache
coherent, then kernel will try to ensure coherency during dma-ops and that may
cause data corruption.

So please add fixes tag and CC stable.

Thanks,
Mani

> Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com>
> ---
>  arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
> index bdcb749..8f4ab6b 100644
> --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
> @@ -2131,6 +2131,8 @@
>  			pinctrl-names = "default";
>  			pinctrl-0 = <&pcie1_clkreq_n>;
>  
> +			dma-coherent;
> +
>  			iommus = <&apps_smmu 0x1c80 0x1>;
>  
>  			iommu-map = <0x0 &apps_smmu 0x1c80 0x1>,
> -- 
> 2.7.4
> 

-- 
மணிவண்ணன் சதாசிவம்

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

end of thread, other threads:[~2023-02-27 13:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-27  9:36 [PATCH V1] arm64:dts:qcom:sc7280: mark memory of PCIe as cache coherent Krishna chaitanya chundru
2023-02-27 13:32 ` Manivannan Sadhasivam

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