mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Robin Murphy <robin.murphy@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, robh+dt@kernel.org,
	frowand.list@gmail.com, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Serge Semin <Sergey.Semin@baikalelectronics.ru>
Subject: Re: [PATCH v2] of: Fix "dma-ranges" handling for bus controllers
Date: Fri, 30 Sep 2022 14:39:01 -0500	[thread overview]
Message-ID: <166456654423.756056.16732005186500514187.robh@kernel.org> (raw)
In-Reply-To: <112e8f3d3e7c054ecf5e12b5ac0aa5596ec00681.1664455433.git.robin.murphy@arm.com>

On Thu, 29 Sep 2022 13:48:38 +0100, Robin Murphy wrote:
> Commit 951d48855d86 ("of: Make of_dma_get_range() work on bus nodes")
> relaxed the handling of "dma-ranges" for any leaf node on the assumption
> that it would still represent a usage error for the property to be
> present on a non-bus leaf node. However there turns out to be a fiddly
> case where a bus also represents a DMA-capable device in its own right,
> such as a PCIe root complex with an integrated DMA engine on its
> platform side. In such cases, "dma-ranges" translation is entirely valid
> for devices discovered behind the bus, but should not be erroneously
> applied to the bus controller device itself which operates in its
> parent's address space. Fix this by restoring the previous behaviour for
> the specific case where a device is configured via its own OF node,
> since it is logical to assume that a device should never represent its
> own parent bus.
> 
> Reported-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> ---
> 
> v2: Fix !HAS_DMA build error
> 
>  drivers/of/address.c    | 4 +++-
>  drivers/of/device.c     | 9 ++++++++-
>  drivers/of/of_private.h | 5 +++++
>  3 files changed, 16 insertions(+), 2 deletions(-)
> 

Applied, thanks!

I assume this was not tagged with Fixes or stable because there is not 
yet a user that needs it? I didn't add it either because I'm a bit 
worried about regressions and applying this just before the merge 
window. So send it to stable later if anyone cares.

Rob

  reply	other threads:[~2022-09-30 19:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 12:48 Robin Murphy
2022-09-30 19:39 ` Rob Herring [this message]
2022-10-04 11:10   ` Robin Murphy

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=166456654423.756056.16732005186500514187.robh@kernel.org \
    --to=robh@kernel.org \
    --cc=Sergey.Semin@baikalelectronics.ru \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.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

all inboxes | Powered by JetHome®