Re: [PATCH] move consistent_dma_mask to the generic device

From: James Bottomley
Date: Fri Feb 27 2004 - 09:58:18 EST


On Fri, 2004-02-27 at 00:57, Jeremy Higdon wrote:
> I haven't had a chance to try it yet, but it looks good.
>
> If you're going to get rid of pci_dev.consistent_dma_mask in favor
> of pci_dev.dev.coherent_dma_mask, would you want to do the same
> with pci_dev.dma_mask?

It's probably about time that was done, yes.

> Which brings to mind a second question; why is device.dma_mask
> a u64 * instead of u64? Does it typically point to pci_dev.dma_mask?

That's a bad design decision that will forever haunt me. When I first
proposed moving from the PCI DMA model to the generic device DMA model,
the dma_mask was in the wrong place. Quite a few drivers touched it
themselves outside of the accessor functions, so actually moving it in
to struct device became quite involved, so I took the easy way out and
simply made the entry in struct device a pointer to the real one so that
anything that updated the mask outside of the accessors would still
work.

I suppose I should really do the work as pennance, plus write out a
hundred times "never sacrifice design integrity for expediency", sigh.

James


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/