[PATCH v3 0/2] alpha: enable DMA CMA support
From: Magnus Lindholm
Date: Sun Nov 15 2026 - 05:38:27 EST
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