mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/2] alpha: enable DMA CMA support
@ 2026-11-27 16:55 Magnus Lindholm
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Magnus Lindholm @ 2026-11-27 16:55 UTC (permalink / raw)
  To: richard.henderson, mattst88, linux-kernel, linux-alpha
  Cc: linmag7, m.szyprowski, kuba, u.kleine-koenig

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-27 16:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-27 16:55 [PATCH v4 0/2] alpha: enable DMA CMA support Magnus Lindholm
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

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®