lkml.org 
[lkml]   [2013]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: DMA masks
Date
On Fri, 2013-08-09 at 11:12 +0200, Krzysztof Hałasa wrote:
> Hi,
>
> I'm trying to understand why the struct device contains a pointer to
> dma_mask and not the actual dma_mask:

It's an anachronism. The original reason was when this was introduced,
struct pci_device was the only device that actually had one. On PA-RISC
we needed to walk the device tree by generic device and set the DMA mask
on generic devices, which meant we either had to special case the PCI
device, rearchitect the whole of the PCI device mask setting to use the
generic device, or cheat and make the generic device dma mask a pointer
to the PCI one. I took the latter option because it's simpler.

James

\
 
 \ /
  Last update: 2013-08-09 17:21    [W:0.029 / U:1.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site