lkml.org 
[lkml]   [2007]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] dma: redefine dma_flags_set/get_*() for sn-ia64
On Tue, 16 Oct 2007 18:43:16 -0700 akepner@sgi.com wrote:

> @@ -153,7 +153,7 @@ EXPORT_SYMBOL(sn_dma_free_coherent);
> * @dev: device to map for
> * @cpu_addr: kernel virtual address of the region to map
> * @size: size of the region
> - * @direction: DMA direction
> + * @flags: DMA direction, and arch-specific attributes
> *
> * Map the region pointed to by @cpu_addr for DMA and return the
> * DMA address.
> @@ -167,17 +167,23 @@ EXPORT_SYMBOL(sn_dma_free_coherent);
> * figure out how to save dmamap handle so can use two step.
> */
> dma_addr_t sn_dma_map_single(struct device *dev, void *cpu_addr, size_t size,
> - int direction)
> + int flags)
> {
> dma_addr_t dma_addr;
> unsigned long phys_addr;
> struct pci_dev *pdev = to_pci_dev(dev);
> struct sn_pcibus_provider *provider = SN_PCIDEV_BUSPROVIDER(pdev);
> + int dmabarrier = dma_flags_get_attr(flags) & DMA_BARRIER_ATTR;

So we take an `enum data_direction' and then wedge it into a word alongside
some extra flags?

Can we do something nicer than that?
-
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/

\
 
 \ /
  Last update: 2007-10-17 05:33    [W:0.050 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site