Re: [PATCH] dma-mapping: Stub out dma_{alloc,free,map}_pages() API

From: Christoph Hellwig
Date: Mon Jun 16 2025 - 09:14:48 EST


On Mon, Jun 16, 2025 at 02:10:40PM +0100, James Clark wrote:
> The change introduces consistency with the existing declarations in
> dma-mapping.h. Surely there is value in consistency and it doesn't do any
> harm to define new ones with stubs the same as the other ones. That way
> when you change an existing device that has DMA stuff to use a new part of
> the API you don't have to predict that it will behave differently to
> another part of the API.

Well, redoing the rest would definitively be nice, but so far no one
has signed up to that.

> I suppose it is possible to #ifdef out the DMA stuff in this driver, but
> IMO it would be quite messy, and I don't think randomly not stubbing out
> some functions is the right way to move towards fixing all the dependencies
> in all drivers. We should continue with the stubs for now and fix whole
> drivers one by one as a proper effort.

Does the driver even work at all without DMA support?