From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>,
catalin.marinas@arm.com, will@kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH] arm64: Kconfig: select ZONE_DMA
Date: Thu, 17 Dec 2020 09:44:31 +0100 [thread overview]
Message-ID: <93832374535cb46419e921f5ee02ecabfe2cc83d.camel@suse.de> (raw)
In-Reply-To: <20201217080802.29023-1-peng.fan@oss.nxp.com>
[-- Attachment #1: Type: text/plain, Size: 1445 bytes --]
Hi Peng,
sorry for the inconvenience, this is most probably related to these changes:
https://lore.kernel.org/linux-arm-kernel/20201119175400.9995-1-nsaenzjulienne@suse.de/
On Thu, 2020-12-17 at 16:08 +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> ZONE_DMA should not be disabled, otherwise arm64_dma_phys_limit is
> left uninitialized and cause swiotlb have IO TLB above 4GB which
> might crash some platforms
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>
> Not sure whether need to address code to initialize the variables or
> force select ZONE_DMA
What is the cause for the swiotlb related crashes? I assume it's DMA into an
address too high for the bus, but it might be something else.
I figure you have a setup with ZONE_DMA32, ZONE_NORMAL and !ZONE_DMA.
First of all, I'd suggest you try arm64's defaults (all zones enabled), the
series I mention above should fix most of the issues we've had with
ZONE_DMA/ZONE_DMA32 in the past. We now parse DT/ACPI and only create two
distinct DMA zones if really needed. Otherwise ZONE_DMA spans the whole 32 bit
address space.
That said, IMO we're not doing the right thing in the !ZONE_DMA && ZONE_DMA32
case, and this should fix it (I didn't test it):
- #define ARCH_LOW_ADDRESS_LIMIT (arm64_dma_phys_limit - 1)
+ #define ARCH_LOW_ADDRESS_LIMIT (arm64_dma_phys_limit ? : arm64_dma32_phys_limit)
Regards,
Nicolas
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-12-17 8:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-17 8:08 Peng Fan (OSS)
2020-12-17 8:44 ` Nicolas Saenz Julienne [this message]
2020-12-17 12:43 ` Catalin Marinas
2020-12-17 14:53 ` Nicolas Saenz Julienne
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=93832374535cb46419e921f5ee02ecabfe2cc83d.camel@suse.de \
--to=nsaenzjulienne@suse.de \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=peng.fan@oss.nxp.com \
--cc=will@kernel.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
all inboxes | Powered by JetHome®