mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@kernel.org>
To: "Linus Walleij" <linusw@kernel.org>
Cc: "Jason Gunthorpe" <jgg@ziepe.ca>,
	"Aneesh Kumar K.V (Arm)" <aneesh.kumar@kernel.org>,
	iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
	"Marek Szyprowski" <m.szyprowski@samsung.com>,
	"Robin Murphy" <robin.murphy@arm.com>,
	"Matthew Wilcox" <willy@infradead.org>,
	"Suzuki K Poulose" <suzuki.poulose@arm.com>,
	"Dmitry Osipenko" <digetx@gmail.com>,
	"Thierry Reding" <treding@nvidia.com>
Subject: Re: [PATCH v2] dma-direct: set decrypted flag for remapped DMA allocations
Date: Wed, 07 Jan 2026 22:23:09 +0100	[thread overview]
Message-ID: <bb62cb70-77ba-4867-b202-2947d383cf15@app.fastmail.com> (raw)
In-Reply-To: <CAD++jL=fwYJ6onVsrM_=ffuqwR2zLJLJNSWWmDM+Ov02Gf-DyQ@mail.gmail.com>

On Wed, Jan 7, 2026, at 18:41, Linus Walleij wrote:
> I did a grep 'alloc-ranges' but now I'm a bit slow in the head
> so cannot really figure out if these will end up outside the
> linear map or not.

The way I see it, we have two ways of doing it:

1GB of RAM, CMA in the last 256MB:
arch/arm/boot/dts/nvidia/tegra20-acer-a500-picasso.dts:
        memory@0 {
                reg = <0x00000000 0x40000000>;
        };
        reserved-memory {
                #address-cells = <1>;
                #size-cells = <1>;
                ranges;
                linux,cma@30000000 {
                        compatible = "shared-dma-pool";
                        alloc-ranges = <0x30000000 0x10000000>;
                        size = <0x10000000>; /* 256MiB */
                        linux,cma-default;
                        reusable;
                };
        };

2GB of RAM, CMA in the first 768MB:
arch/arm/boot/dts/nvidia/tegra30-asus-p1801-t.dts
        memory@80000000 {
                reg = <0x80000000 0x80000000>;
        };
        reserved-memory {
                #address-cells = <1>;
                #size-cells = <1>;
                ranges;
                linux,cma@80000000 {
                        compatible = "shared-dma-pool";
                        alloc-ranges = <0x80000000 0x30000000>;
                        size = <0x10000000>;            /* 256MiB */
                        linux,cma-default;
                        reusable;
                };
         };

With CONFIG_VMSPLIT_3G, the first example spans all of highmem,
i.e. 0x30000000-0x3fffffff, the second example spans all of
lowmem at 0x80000000-0xafffffff.

      Arnd

  reply	other threads:[~2026-01-07 21:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-02 15:50 Aneesh Kumar K.V (Arm)
2026-01-05 17:53 ` Jason Gunthorpe
2026-01-07 14:26   ` Linus Walleij
2026-01-07 15:03     ` Arnd Bergmann
2026-01-07 17:41       ` Linus Walleij
2026-01-07 21:23         ` Arnd Bergmann [this message]
2026-01-14  9:47 ` Aneesh Kumar K.V

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=bb62cb70-77ba-4867-b202-2947d383cf15@app.fastmail.com \
    --to=arnd@kernel.org \
    --cc=aneesh.kumar@kernel.org \
    --cc=digetx@gmail.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=linusw@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=robin.murphy@arm.com \
    --cc=suzuki.poulose@arm.com \
    --cc=treding@nvidia.com \
    --cc=willy@infradead.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®