From: Robin Murphy <robin.murphy@arm.com>
To: Roger Quadros <rogerq@ti.com>, Tony Lindgren <tony@atomide.com>,
Christoph Hellwig <hch@lst.de>
Cc: yan-liu@ti.com, linux-omap@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Rob Herring <robh+dt@kernel.org>, "Nori, Sekhar" <nsekhar@ti.com>
Subject: Re: [PATCH] dra7: sata: Fix SATA with CONFIG_ARM_LPAE enabled
Date: Thu, 5 Mar 2020 12:30:56 +0000 [thread overview]
Message-ID: <00951cc4-6cbf-a3cf-5f2c-007d5b43ac5b@arm.com> (raw)
In-Reply-To: <145c0448-ea33-8704-4fde-03fb180100d6@ti.com>
On 05/03/2020 12:05 pm, Roger Quadros wrote:
> Tony, Christoph,
>
> On 04/03/2020 18:20, Tony Lindgren wrote:
>> * Roger Quadros <rogerq@ti.com> [200304 09:01]:
>>> Even though the TRM says that SATA IP has 36 address bits
>>> wired in the SoC, we see bus errors whenever any address
>>> greater than 32-bit is given to the controller.
>>>
>>> This happens on dra7-EVM with 4G of RAM with CONFIG_ARM_LPAE=y.
>>>
>>> As a workaround we limit the DMA address range to 32-bits
>>> for SATA.
>>>
>>> Cc: Christoph Hellwig <hch@lst.de>
>>> Cc: Robin Murphy <robin.murphy@arm.com>
>>> Cc: Rob Herring <robh+dt@kernel.org>
>>> Reported-by: Yan Liu <yan-liu@ti.com>
>>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>>> ---
>>>
>>> NOTE: Currently ARM dma-mapping code doesn't account for devices
>>> bus_dma_limit. This is fixed in [1].
>>>
>>> [1] https://lkml.org/lkml/2020/2/18/712
>>
>> So is this dts patch safe to apply without the series above?
>>
>
> Yes. To my surprise this patch fixes the SATA issue even without [1].
> Without this patch dev->bus_dma_limit was being set to 0 and with the patch
> it is being set to 0xffffffff.
Right - LPAE configs should be getting dma-direct ops since 5.3, which
already respect the limit. For non-LPAE configs it means you go from
being broken from having no limit at all, to having a limit set but not
respected, which is still equally broken, but no *more* so than before.
Robin.
>> And should this dts patch be applied as a fix or can it wait
>> until the merge window?
>
> I think we should mark it for stable and apply it right away as fix for
> v5.6.
>
> Cc: stable@kernel.org
>
> cheers,
> -roger
>>
>> Regards,
>>
>> Tony
>>
>>> arch/arm/boot/dts/dra7.dtsi | 25 ++++++++++++++++---------
>>> 1 file changed, 16 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
>>> index d78b684e7fca..895462c22d1c 100644
>>> --- a/arch/arm/boot/dts/dra7.dtsi
>>> +++ b/arch/arm/boot/dts/dra7.dtsi
>>> @@ -642,15 +642,22 @@
>>> };
>>> /* OCP2SCP3 */
>>> - sata: sata@4a141100 {
>>> - compatible = "snps,dwc-ahci";
>>> - reg = <0x4a140000 0x1100>, <0x4a141100 0x7>;
>>> - interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
>>> - phys = <&sata_phy>;
>>> - phy-names = "sata-phy";
>>> - clocks = <&l3init_clkctrl DRA7_L3INIT_SATA_CLKCTRL 8>;
>>> - ti,hwmods = "sata";
>>> - ports-implemented = <0x1>;
>>> + sata_aux_bus {
>>> + #address-cells = <1>;
>>> + #size-cells = <2>;
>>> + compatible = "simple-bus";
>>> + ranges = <0x0 0x4a140000 0x0 0x1200>;
>>> + dma-ranges = <0x0 0x0 0x1 0x00000000>;
>>> + sata: sata@4a141100 {
>>> + compatible = "snps,dwc-ahci";
>>> + reg = <0x0 0x0 0x1100>, <0x1100 0x0 0x7>;
>>> + interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
>>> + phys = <&sata_phy>;
>>> + phy-names = "sata-phy";
>>> + clocks = <&l3init_clkctrl DRA7_L3INIT_SATA_CLKCTRL 8>;
>>> + ti,hwmods = "sata";
>>> + ports-implemented = <0x1>;
>>> + };
>>> };
>>> /* OCP2SCP1 */
>>> --
>>> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
>>> Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
>>>
>
next prev parent reply other threads:[~2020-03-05 12:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-04 9:00 [PATCH] dra7: sata: Fix SATA with CONFIG_ARM_LPAE enabled Roger Quadros
2020-03-04 16:20 ` Tony Lindgren
2020-03-05 12:05 ` Roger Quadros
2020-03-05 12:30 ` Robin Murphy [this message]
2020-03-05 15:16 ` Christoph Hellwig
2020-03-05 16:04 ` Robin Murphy
2020-03-05 16:46 ` Roger Quadros
2020-03-06 15:08 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=00951cc4-6cbf-a3cf-5f2c-007d5b43ac5b@arm.com \
--to=robin.murphy@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=robh+dt@kernel.org \
--cc=rogerq@ti.com \
--cc=tony@atomide.com \
--cc=yan-liu@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox