Re: [PATCH v3 2/2] alpha: enable contiguous memory allocation for coherent DMA

From: Marek Szyprowski

Date: Fri Nov 27 2026 - 03:05:14 EST


On 25.11.2026 12:52, Magnus Lindholm wrote:
> On Wed, Nov 25, 2026 at 11:53 AM Uwe Kleine-König
> <u.kleine-koenig@xxxxxxxxxxxx> wrote:
>> On Wed, Nov 25, 2026 at 09:54:08AM +0100, Marek Szyprowski wrote:
>>> On 25.11.2026 00:22, Magnus Lindholm wrote:
>>>> Thanks for catching this and identifying the interacting commits.
>>>>
>>>> I reproduced the error on next-20261123. In
>>>> arch/alpha/kernel/pci_iommu.c, I changed:
>>>>
>>>> page = (gfp & GFP_DMA) ? NULL : dma_alloc_contiguous(dev, size, gfp);
>>>>
>>>> to:
>>>>
>>>> page = (gfp & GFP_DMA) ? NULL :
>>>> dma_alloc_contiguous(dev, size, gfp, dev_to_node(dev));
>>>>
>>>> This fixes the allmodconfig pci_iommu.o build. A full DP264 UP build
>>>> with CMA enabled also passed, as did an object build with CMA disabled.
>>>> The full allmodconfig build hit an unrelated cgroup sample error
>>>> involving PATH_MAX and LINE_MAX.
>>>>
>>>> I'd prefer to keep the Alpha tree independent of the DMA series.
>> That's up to you, but in my eyes merging in the immutable branch
>> provided by Jakub into your tree (or rebasing on top of it as suggested
>> by Marek) is really the easiest option. That way you don't have to wait
>> for the change to hit Linus' tree and there is no further need for
>> coordination or others paying attention to not create non-bisectable
>> commit graphs.
>>
>> However looking at the immutable branch I see it contains both the dma
>> API change and then separately various adaptions to ethernet drivers.
>> IMHO the immutable branch should only contain the API changes (that is
>> the commits up to 31f7e12d621b) to reduce the amount of possible
>> conflict.
> Thanks, that makes sense. I guess best is for me to rebase the Alpha changes
> onto the shared DMA API changes and update the caller in my CMA commit.
>
> As you point out, using only the four API commits through 31f7e12d621b
> would avoid bringing the Ethernet driver conversions into the Alpha tree.
>
> Jakub, Marek, would that commit be a suitable immutable base for this?

Yes, that would also work.


> A separate stable tag at that point would be helpful.
>
> I'll then rebase, retest, and notify Mark before updating for-next.

Here is a stable tag for You, I'm sorry for the delay:

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

Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland