mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/2] alpha: enable DMA CMA support
@ 2026-11-15 10:37 Magnus Lindholm
  2026-11-15 10:37 ` [PATCH v3 1/2] alpha: parse early parameters before reserving contiguous memory Magnus Lindholm
  2026-11-15 10:37 ` [PATCH v3 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-15 10:37 UTC (permalink / raw)
  To: richard.henderson, mattst88, linux-kernel, linux-alpha; +Cc: linmag7

Changes since v2, following Matt Turner's review:

- Initialize jump labels before parsing early parameters, so handlers
  can safely change static keys. Carry Matt's Reviewed-by on patch 1.
- Page-align sizes in both coherent allocation and free. The CMA helper
  assumes a page-aligned size; truncating an unaligned request can cause
  an undersized allocation, an overwrite, and release of unowned pages.
- Change the failure message to "allocation failed".

V2 was boot-tested on a three-CPU AlphaServer ES40 with cma=64M,
including 32 MiB, 24 KiB and 8 KiB allocation tests and GFP_ATOMIC
bypass checks. All of those sizes were page multiples, so they did
not exercise the alignment bug. Those results are not validation
of v3; build and runtime validation of this revision remain pending.

Planned regression cases include 12 KiB and 20 KiB requests, checking
zeroing, mapped size, and allocation/release accounting against the
page-rounded size on each CPU. Repeat the existing static-key tests
on a combined kernel with jump-label v3.

Reservation policy is unchanged: prefer top-down placement below the
direct-map and usable RAM limits, with generic cma= range overrides.
Other reservation-size boots and no-IOMMU testing remain outstanding.

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                 | 19 ++++++++++++------
 arch/alpha/kernel/setup.c                     | 20 +++++++++++++++++++
 4 files changed, 35 insertions(+), 7 deletions(-)


base-commit: 0b4cadbe7c39d830dec35c4a2655483de0dae568
-- 
2.43.0


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

end of thread, other threads:[~2026-11-15 10:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-15 10:37 [PATCH v3 0/2] alpha: enable DMA CMA support Magnus Lindholm
2026-11-15 10:37 ` [PATCH v3 1/2] alpha: parse early parameters before reserving contiguous memory Magnus Lindholm
2026-11-15 10:37 ` [PATCH v3 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®