Messages in this thread | | | Subject | Re: [Patch] DMA mapping API for Alpha | From | "David S. Miller" <> | Date | 01 May 2003 03:56:01 -0700 |
| |
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> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |