mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Magnus Lindholm <linmag7@gmail.com>
To: richard.henderson@linaro.org, mattst88@gmail.com,
	linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org
Cc: linmag7@gmail.com, m.szyprowski@samsung.com, kuba@kernel.org,
	u.kleine-koenig@baylibre.com
Subject: [PATCH v4 0/2] alpha: enable DMA CMA support
Date: Fri, 27 Nov 2026 17:55:48 +0100	[thread overview]
Message-ID: <20261127165626.1352471-1-linmag7@gmail.com> (raw)

This series enables CMA for Alpha coherent DMA allocations and parses
early parameters before reserving the CMA area.

Changes in v4:
- Rebase onto Marek's stable dma_alloc_coherent_node_api tag.
- Pass dev_to_node(dev) as the fourth argument to dma_alloc_contiguous(),
  preserving the previous device-node selection.

Patch 1 is unchanged. Matt Turner's Reviewed-by tags are retained on
both patches.

Built with GCC 14.2.1 and boot-tested on a three-CPU AlphaServer ES40
(DP264 SMP), with CMA, compaction and jump labels enabled. Booting with
cma=64M reserved 64 MiB as requested.

A private coherent-DMA probe passed 39 allocation/free cases across
all three CPUs. Requests included 1 byte, 8 KiB - 1, 8 KiB, 8 KiB + 1,
12 KiB, 16 KiB - 1, 16 KiB, 16 KiB + 1, 20 KiB, 24 KiB and 32 MiB.
Checks covered zeroing, data integrity, page-rounded CMA usage and
restoration of the CMA bitmap after free. GFP_ATOMIC requests of
12 KiB and 20 KiB correctly bypassed CMA on every CPU. No new kernel
errors appeared during the tests; loading the private probe produced
only the expected out-of-tree-module taint. No hardware DMA transfers
were submitted by the probe.

These two commits were tested in the complete Alpha queue at
b4a6d2833fb56d3cf04c4d243f00b7a3f92bd43a. The exported patches also
apply directly to the API tag below. Both pass checkpatch.
Other reservation-size boots and no-IOMMU testing remain outstanding.

Base repository:
https://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux.git
Tag: dma_alloc_coherent_node_api

Previous version:
https://lore.kernel.org/r/20261115103809.1288167-1-linmag7@gmail.com

Magnus Lindholm (2):
  alpha: parse early parameters before reserving contiguous memory
  alpha: enable contiguous memory allocation for coherent DMA

 .../io/dma-contiguous/arch-support.txt        |  2 +-
 arch/alpha/Kconfig                            |  1 +
 arch/alpha/kernel/pci_iommu.c                 | 20 +++++++++++++------
 arch/alpha/kernel/setup.c                     | 20 +++++++++++++++++++
 4 files changed, 36 insertions(+), 7 deletions(-)

base-commit: 31f7e12d621bc5b1dcda0b5e6855e39adc8aaebd
-- 
2.43.0


             reply	other threads:[~2026-11-27 16:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 16:55 Magnus Lindholm [this message]
2026-11-27 16:55 ` [PATCH v4 1/2] alpha: parse early parameters before reserving contiguous memory Magnus Lindholm
2026-11-27 16:55 ` [PATCH v4 2/2] alpha: enable contiguous memory allocation for coherent DMA Magnus Lindholm

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=20261127165626.1352471-1-linmag7@gmail.com \
    --to=linmag7@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mattst88@gmail.com \
    --cc=richard.henderson@linaro.org \
    --cc=u.kleine-koenig@baylibre.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®