Messages in this thread | | | From | akepner@sgi ... | Date | Mon, 17 Dec 2007 16:17:58 -0800 | Subject | [RFC] dma: passing "attributes" to dma_map_* routines |
| |
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
| |