DMA Engine development
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Ben Collins" <bcollins@kernel.org>, dmaengine@vger.kernel.org
Cc: "Zhang Wei" <zw@zh-kernel.org>, "Vinod Koul" <vkoul@kernel.org>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fsldma: Support 40 bit DMA addresses where capable
Date: Tue, 22 Apr 2025 08:34:55 +0200	[thread overview]
Message-ID: <fb0b5293-1cf3-4fcc-be9c-b5fe83f32325@app.fastmail.com> (raw)
In-Reply-To: <2025042122-bizarre-ibex-b7ed42@boujee-and-buff>

On Tue, Apr 22, 2025, at 04:49, Ben Collins wrote:
> On 64-bit QorIQ platforms like T4240, the CPU supports 40-bit addressing
> and memory configurations > 64GiB. The fsldma driver is limiting itself
> to only 64GiB in all Elo configurations.
>
> Setup fsldma driver to make use of the full 40-bit addressing space,
> specifically on the e5500 and e6500 CPUs.

I don't think making the mask depend on a compile-time option is
correct, e.g. when you build a combined 32-bit kernel for e500 and
e5500, you set a different mask compared to an e500-only kernel.

The question here is whether the mask is a limitation of the
IP block or the bus it's connected to, of if there is any
limitation at all:

- The driver just writes the DMA address as a 64-bit register,
  so most likely the DMA device can in fact do wider addressing,
  and any limitation is either in the bus or the available
  memory

- SoCs that don't set a dma-ranges property in the parent bus
  are normally still capped to 32 bit DMA. I don't see those
  properties, so unless there is a special hack on those chips,
  you get 32 bit DMA regardless of what DMA mask the driver
  requests

- If there are chips that have more than 64GB of RAM installed
  but have a limitation in the way the DMA engine is wired
  up to 36 bits, that should be reflected in the dma-ranges
  property, not the device driver.

- If the limitation is indeed specific to the version of the
  IP block, this would normally need to be detected based on
  the compatible string of the DMA engine itself, not a compile
  time setting.

     Arnd

  reply	other threads:[~2025-04-22  6:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-22  2:49 [PATCH] fsldma: Support 40 bit DMA addresses where capable Ben Collins
2025-04-22  6:34 ` Arnd Bergmann [this message]
2025-04-22  7:12   ` Ben Collins
2025-04-22  7:59     ` Arnd Bergmann
2025-04-22  8:56       ` Ben Collins
2025-04-22  9:25         ` Arnd Bergmann
2025-04-22 21:10           ` Ben Collins
2025-04-23 13:49             ` Arnd Bergmann
2025-04-23 20:41               ` Ben Collins
2025-04-23 20:56                 ` Arnd Bergmann

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=fb0b5293-1cf3-4fcc-be9c-b5fe83f32325@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=bcollins@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=vkoul@kernel.org \
    --cc=zw@zh-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