From: Jonathan Marek <jonathan@marek.ca>
To: Stephan Gerhold <stephan.gerhold@linaro.org>
Cc: linux-arm-msm@vger.kernel.org,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Sibi Sankar <sibi.sankar@oss.qualcomm.com>,
Abel Vesa <abel.vesa@linaro.org>,
Rajendra Nayak <quic_rjendra@quicinc.com>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] arm64: dts: qcom: x1e: bus is 40-bits (fix 64GB models)
Date: Fri, 28 Nov 2025 11:34:40 -0500 [thread overview]
Message-ID: <1aa75dd2-6fb4-e9ca-ca27-c0bd910246fe@marek.ca> (raw)
In-Reply-To: <aSnH3C8s5xVSk_ti@linaro.org>
On 11/28/25 11:03 AM, Stephan Gerhold wrote:
> On Fri, Nov 28, 2025 at 09:39:52AM -0500, Jonathan Marek wrote:
>> On 11/28/25 5:26 AM, Stephan Gerhold wrote:
...
>>
>> I am using EL2.
>>
>> Without this patch, DMA buffers allocated in the upper 36-bit physical range
>> will try to use bounce buffers. The dma range from the dts is compared
>> against the physical address, not the virtual address.
>
> I don't think this is the case for the dma-iommu layer. I debugged a
> crash caused by USB in EL1 on a 64 GiB device earlier this year and it
> was happily using buffers above the 36-bit physical range without using
> bounce buffers. There is some code inside dma-iommu for using swiotlb,
> but it's used only for "untrusted" PCI devices and some edge cases with
> unaligned/small buffers.
>
>>
>> The crash I see is display driver crashes/freezes once a buffer is allocated
>> in the upper 36-bit range and it tries to use bounce buffers. This can
>> happens very quickly under load.
>>
>
> You could be right about the MSM display driver though, since that
> bypasses dma-iommu and manages the IOMMU itself. I stared at the code a
> bit and I'm not immediately seeing where it would end up calling into
> swiotlb, but it might be hidden somewhere in the endless nesting.
>
Looks like you are right about this, MSM driver ends up going through
dma_direct_map_phys(), which decides to use bounce buffers. I didn't try
to see if other drivers end up using bounce buffers, but it would make
sense that only MSM driver is affected.
>> The same crash would happen for EL1 as well. I wasn't aware of the EL1
>> broken firmware when I sent this patch, but instead of display freezing I
>> guess the behavior would a hard reset now, which is a bit worse but still
>> unusable unles display/gpu driver is disabled.
>>
>> This patch is correct and should be applied regardless of broken-firmware
>> EL1 cases (where 64GB isn't usable anyway), but I guess the Fixes tag
>> can/should be dropped.
>>
>
> Please clarify the commit message a bit and mention the two separate use
> cases (EL1 and EL2). I'll leave it up to Bjorn/Konrad to decide whether
> to merge it. At the end you are right and using 64 GiB RAM in EL1 is
> kind of a lost cause anyway.
>
> Thanks,
> Stephan
>
next prev parent reply other threads:[~2025-11-28 16:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-27 21:29 [PATCH] arm64: dts: qcom: x1e: bus is 40-bits (fix 64GB models) Jonathan Marek
2025-11-28 10:26 ` Stephan Gerhold
2025-11-28 10:52 ` Konrad Dybcio
2025-11-28 14:49 ` Jonathan Marek
2025-12-01 13:40 ` Konrad Dybcio
2025-11-28 14:39 ` Jonathan Marek
2025-11-28 16:03 ` Stephan Gerhold
2025-11-28 16:34 ` Jonathan Marek [this message]
2025-11-28 22:10 ` Christopher Obbard
2025-11-28 22:39 ` Christopher Obbard
2025-11-28 23:56 ` Jonathan Marek
2025-12-01 0:13 ` Steev Klimaszewski
2025-12-01 2:06 ` Jonathan Marek
2025-12-01 2:25 ` Steev Klimaszewski
2026-01-16 21:39 ` Bjorn Andersson
2026-01-16 22:53 ` Jonathan Marek
2026-01-16 23:19 ` Bjorn Andersson
2026-01-16 23:45 ` Jonathan Marek
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=1aa75dd2-6fb4-e9ca-ca27-c0bd910246fe@marek.ca \
--to=jonathan@marek.ca \
--cc=abel.vesa@linaro.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_rjendra@quicinc.com \
--cc=robh@kernel.org \
--cc=sibi.sankar@oss.qualcomm.com \
--cc=stephan.gerhold@linaro.org \
/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