[RFC] dma: passing "attributes" to dma_map_* routines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Waaay back in October I sent some patches for passing additional 
attributes to the dma_map_* routines:

http://marc.info/?l=linux-kernel&m=119137949604365&w=2

This is somthing needed for ia64 Altix NUMA machines (as described 
in that thread).

Several folks objected to the approach I used - it was a bit of a 
hack - and so these patches were dropped. 

This time I'd like to get something resembling concensus before 
spending much time on this. 

Can you please comment on the options listed here, or suggest 
alternatives?

We could:

1) add an additional parameter to the dma_map_* routines, somthing 
   like:

     dma_map_single(struct device *dev, void *cpu_addr, size_t size,
                    enum dma_data_direction direction, u32 flags)
     ....

2) change the "direction" argument to be a field of bits:

     dma_map_single(struct device *dev, void *cpu_addr, size_t size,
                    u32 flags)
     ....

     where flags encodes the direction and optionally other attributes.

3) add new functions to the dma interface, e.g.:

     dma_map_single_attrs(struct device *dev, void *cpu_addr, size_t size,
                          enum dma_data_direction direction, u32 attrs)
     .....

1) and 2) are going to require many minor changes, and 3) is going 
to pollute the dma interface a bit. 

Other ideas?

-- 
Arthur

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux