Re: problem with blk_queue_bounce_limit()

Christoph Hellwig
2003-06-06T07:30:49Z

On Fri, Jun 06, 2003 at 12:32:30AM -0700, David S. Miller wrote:
> We could convert the few compile time checks of PCI_DMA_BUS_IS_PHYS
> so that you can set this based upon the configuration of the machine
> if for some configurations it is true. drivers/net/tg3.c is the
> only offender, my bad :-)

That reminds of of another thing that came up when looking over
the scsi bounce limit setting code. All this bounce code ist based
purely on a scsi host and if existant it's struct device - imo
PCI_DMA_BUS_IS_PHYS should be a propert of each struct device because
a machine might have a iommu for one bus type but not another, e.g.

dma_is_phys(dev);

For those arches that need it this could be expanded to per-bus
code, for all those where everything is either phys or not it
would be a simple define that ignores the argument and still produces
"perfect" code.