Re: [PATCH 1/1] dmaengine: virt-dma: convert tasklet to BH workqueue for callback invocation

From: Andy Shevchenko
Date: Fri Jun 13 2025 - 16:59:26 EST


On Fri, Jun 13, 2025 at 9:51 PM Alexander Kochetkov <al.kochet@xxxxxxxxx> wrote:

...

> > What about the driver(s) that use threaded IRQ instead?
> > Do you plan to convert them as well?
> >
> > I am talking about current users of virt-dma that do not use tasklets.
>
> I think, I've found all the users of virt-dma. Could you, please,
> provide example of such driver?
> Here is what I did to locate current users of virt-dma.
>
> I got list of drivers using following command:
> grep -r -e 'struct virt_dma_chan' -e 'virt-dma.h' . | sort | cut -f 1
> -d : | uniq

Side note, `git grep -lw 'struct virt_dma_chan'` will get you the list
much faster and easier to remember the command.
Same for virt-dma.h.

...

> ./drivers/dma/sh/rz-dmac.c
> ./drivers/dma/sh/usb-dmac.c

These, for instance, are not in the patch.

...

> After that I did following to find additional drivers, and found them
> inside misc.
> grep -r -e ae4dma.h -e ptdma.h -e qdma.h -e dw-axi-dmac.h -e
> dw-edma-core.h -e dpaa2-qdma.h -e fsl-edma-common.h -e hsu.h -e
> idma64.h -e sf-pdma.h -e st_fdma.h . | sort | cut -f 1 -d : | uniq

Same side note as above :-)

> I've applied the following config to the kernel, to build all the
> drivers. I've modified some Kconfig files in order all options apply.
> And checked that every file in the above list builds successfully.
> Some drivers have compile errors, unrelated to virt-dma.

Any pointers? This needs to be fixed independently on your series.

> Some drivers
> produce link errors, but compile success. I checked that each .o-file
> has a reasonable size.

...

> # CONFIG_QCOM_ADM=y - error: assignment to 'u32 *' {aka 'unsigned int
> *'} from incompatible pointer type 'phys_addr_t *'

Have you tried to check via `git log -p -- drivers/ ...` which commit
brought that?

...

> # CONFIG_FSL_DMA=y - error: implicit declaration of function '__ilog2

This needs a log2.h?
However it seems this is defined in asm/bitops.h for PPC. And it's
only a single architecture which does this interesting trick. Perhaps
it needs to be fixed differently, i.e. making sure that code uses
ilog2() from log2.h directly.

--
With Best Regards,
Andy Shevchenko