Re: [RFC][PATCH] move dma_mask into struct device

J.E.J. Bottomley (James.Bottomley@steeleye.com)
Sat, 16 Nov 2002 12:01:59 -0500


arndb@de.ibm.com said:
> On my s390 system, I can have many thousand devices and none of them
> is doing DMA, so I would indeed call it architecture specific. Note
> that even in a normal PC system, most devices (e.g. CPUs, input
> devices or the disks attached to the host adapter) don't have any
> concept of DMA.

DMA itself is pervasive to almost every architecture, that's why we have the
DMA API. That some devices don't do DMA, I agree with (the struct scsi_device
is another example). However, in order to divorce DMA from the PCI bus, it
has to be obtainable from the generic device, without requiring knowledge of
the bus. In OO terms, it would be in a dmaable_device which inherits from
device, but for expediency in layering all this into the kernel means I'd have
to break almost every driver and introduce them to the concept of
dmaable_device, so it's just easier to expand device by a pointer.

James

-
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/