From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Christoph Hellwig <hch@lst.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
Robin Murphy <robin.murphy@arm.com>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
linux-rpi-kernel@lists.infradead.org,
Jeremy Linton <jeremy.linton@arm.com>,
iommu@lists.linux-foundation.org,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>
Subject: Re: [PATCH v2 2/5] of/address: Introduce of_dma_lower_bus_limit()
Date: Wed, 14 Oct 2020 13:34:47 +0200 [thread overview]
Message-ID: <3023eb53ffd2afd8c6c0755af825e426e109cbc2.camel@suse.de> (raw)
In-Reply-To: <CAMj1kXF26z54XA-eMz76eJKuK1T8mZmDfibt+6SQw9bR=RFS_Q@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1927 bytes --]
On Sun, 2020-10-11 at 09:47 +0200, Ard Biesheuvel wrote:
> Hi Nicolas,
>
> $SUBJECT is out of sync with the patch below. Also, for legibility, it
> helps if the commit log is intelligible by itself, rather than relying
> on $SUBJECT being the first line of the first paragraph.
Noted, I'll update all commit logs.
> On Sat, 10 Oct 2020 at 17:12, Nicolas Saenz Julienne
> <nsaenzjulienne@suse.de> wrote:
> > The function provides the CPU physical address addressable by the most
> > constrained bus in the system. It might be useful in order to
> > dynamically set up memory zones during boot.
> >
> > Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> > ---
> > drivers/of/address.c | 34 ++++++++++++++++++++++++++++++++++
> > include/linux/of.h | 7 +++++++
> > 2 files changed, 41 insertions(+)
> >
> > diff --git a/drivers/of/address.c b/drivers/of/address.c
> > index eb9ab4f1e80b..755e97b65096 100644
> > --- a/drivers/of/address.c
> > +++ b/drivers/of/address.c
> > @@ -1024,6 +1024,40 @@ int of_dma_get_range(struct device_node *np, const struct bus_dma_region **map)
> > }
> > #endif /* CONFIG_HAS_DMA */
> >
> > +/**
> > + * of_dma_safe_phys_limit - Get system wide DMA safe address space
> > + *
> > + * Gets the CPU physical address limit for safe DMA addressing system wide by
> > + * searching for the most constraining dma-range. Otherwise it returns ~0ULL.
> > + */
> > +u64 __init of_dma_safe_phys_limit(void)
>
> I don't think 'safe' strikes the right tone here. You are looking for
> the highest CPU address that is addressable by all DMA masters in the
> system.
>
> Something like
>
> of_dma_get_max_cpu_address(void)
>
> perhaps? Also, since this is generic code, phys_addr_t is probably a
> better type to return.
Sonds good to me, I dindn't like the name I used either.
Will use with phys_addr_t.
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-10-14 11:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-10 15:12 [PATCH v2 0/5] arm64: Default to 32-bit wide ZONE_DMA Nicolas Saenz Julienne
2020-10-10 15:12 ` [PATCH v2 1/5] arm64: mm: Move zone_dma_bits initialization into zone_sizes_init() Nicolas Saenz Julienne
2020-10-12 11:37 ` Catalin Marinas
2020-10-12 14:23 ` Ard Biesheuvel
2020-10-10 15:12 ` [PATCH v2 2/5] of/address: Introduce of_dma_lower_bus_limit() Nicolas Saenz Julienne
2020-10-11 7:47 ` Ard Biesheuvel
2020-10-14 11:34 ` Nicolas Saenz Julienne [this message]
2020-10-12 15:25 ` Rob Herring
2020-10-14 11:52 ` Nicolas Saenz Julienne
2020-10-14 12:23 ` Rob Herring
2020-10-10 15:12 ` [PATCH v2 3/5] dma-direct: Turn zone_dma_bits default value into a define Nicolas Saenz Julienne
2020-10-10 15:12 ` [PATCH v2 4/5] arm64: mm: Dynamically resize zone_dma_bits based on system's constraints Nicolas Saenz Julienne
2020-10-10 15:12 ` [PATCH v2 5/5] mm: Update DMA zones description 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=3023eb53ffd2afd8c6c0755af825e426e109cbc2.camel@suse.de \
--to=nsaenzjulienne@suse.de \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=hch@lst.de \
--cc=iommu@lists.linux-foundation.org \
--cc=jeremy.linton@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).