Re: [Patch] DMA mapping API for Alpha

David S. Miller
2003-05-02T00:02:24Z

On Tue, 2003-04-29 at 13:08, Ivan Kokshaysky wrote:
> Ok, for clean dma_* implementation on alpha (and others, I guess) we need
> to move root level IO controller data from struct pci_dev (pdev->sysdata)
> to struct dev. Actually, the latter already has such field (platform_data)
> but right now it's kind of parisc specific. ;-)
> I'll look into it after short vacation (4-5 days).

I don't know if this will really be all that nice Ivan.

The data is different for me on PCI vs. SBUS vs. whatever.
This knowledge of what the dev->platform_data type is has to come from
somewhere.

This means device->ops->dma_*(), a level of indirection I wish terribly
that we could avoid. If a driver is PCI or SBUS only it should not eat
this overhead, I should just call call sbus_*() or pci_*() and this
vectors directly to the proper DMA routines.

Doing all of this generic crap is nice for writing generic drivers,
but terrible for what the generated code will look like. This kind of
stuff tends to silently accumulate, and it's really hard to delete once
it's there.

--
David S. Miller <davem@redhat.com>