]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI: qcom-ep: Override NO_SNOOP attribute for SA8775P EP
authorMrinmay Sarkar <quic_msarkar@quicinc.com>
Mon, 11 Mar 2024 14:11:36 +0000 (19:41 +0530)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 9 Jul 2024 21:56:25 +0000 (16:56 -0500)
commitc71b5eb3b86448aa4bad6b2ca94c6e1d1962a5fb
tree6ea39f279ebf2b3be44a2ca1c3e1b6641bafa8bf
parent1d648bf79d4dca909f242b1a0cdc458e4f9d0253
PCI: qcom-ep: Override NO_SNOOP attribute for SA8775P EP

Due to some hardware changes, SA8775P has set the NO_SNOOP attribute
in its TLP for all the PCIe controllers. NO_SNOOP attribute when set,
the requester is indicating that no cache coherency issues exist for
the addressed memory on the host i.e., memory is not cached. But in
reality, requester cannot assume this unless there is a complete
control/visibility over the addressed memory on the host.

And worst case, if the memory is cached on the host, it may lead to
memory corruption issues. It should be noted that the caching of memory
on the host is not solely dependent on the NO_SNOOP attribute in TLP.

So to avoid the corruption, this patch overrides the NO_SNOOP attribute
by setting the PCIE_PARF_NO_SNOOP_OVERIDE register. This patch is not
needed for other upstream supported platforms since they do not set
NO_SNOOP attribute by default.

Link: https://lore.kernel.org/linux-pci/1710166298-27144-3-git-send-email-quic_msarkar@quicinc.com
Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com>
Signed-off-by: Krzysztof WilczyƄski <kwilczynski@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
drivers/pci/controller/dwc/pcie-qcom-ep.c