diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-28 21:14:24 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-28 21:14:24 -0400 |
| commit | 1d9b9f6a53d77ed801ba875f937d6dabbfc381ce (patch) | |
| tree | 36ea93b80a444c3b37111e352790ebc07f29379f /include/asm-generic | |
| parent | a3ad7f128c637b7612ebeacb1f85fec933bb1195 (diff) | |
| parent | 12c0b20fa4afb5c8a377d6987fb2dcf353e1dce1 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (21 commits)
x86/PCI: use dev_printk when possible
PCI: add D3 power state avoidance quirk
PCI: fix bogus "'device' may be used uninitialized" warning in pci_slot
PCI: add an option to allow ASPM enabled forcibly
PCI: disable ASPM on pre-1.1 PCIe devices
PCI: disable ASPM per ACPI FADT setting
PCI MSI: Don't disable MSIs if the mask bit isn't supported
PCI: handle 64-bit resources better on 32-bit machines
PCI: rewrite PCI BAR reading code
PCI: document pci_target_state
PCI hotplug: fix typo in pcie hotplug output
x86 gart: replace to_pages macro with iommu_num_pages
x86, AMD IOMMU: replace to_pages macro with iommu_num_pages
iommu: add iommu_num_pages helper function
dma-coherent: add documentation to new interfaces
Cris: convert to using generic dma-coherent mem allocator
Sh: use generic per-device coherent dma allocator
ARM: support generic per-device coherent dma mem
Generic dma-coherent: fix DMA_MEMORY_EXCLUSIVE
x86: use generic per-device dma coherent allocator
...
Diffstat (limited to 'include/asm-generic')
| -rw-r--r-- | include/asm-generic/dma-coherent.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/asm-generic/dma-coherent.h b/include/asm-generic/dma-coherent.h new file mode 100644 index 000000000000..85a3ffaa0242 --- /dev/null +++ b/include/asm-generic/dma-coherent.h | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | #ifndef DMA_COHERENT_H | ||
| 2 | #define DMA_COHERENT_H | ||
| 3 | |||
| 4 | #ifdef CONFIG_HAVE_GENERIC_DMA_COHERENT | ||
| 5 | /* | ||
| 6 | * These two functions are only for dma allocator. | ||
| 7 | * Don't use them in device drivers. | ||
| 8 | */ | ||
| 9 | int dma_alloc_from_coherent(struct device *dev, ssize_t size, | ||
| 10 | dma_addr_t *dma_handle, void **ret); | ||
| 11 | int dma_release_from_coherent(struct device *dev, int order, void *vaddr); | ||
| 12 | |||
| 13 | /* | ||
| 14 | * Standard interface | ||
| 15 | */ | ||
| 16 | #define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY | ||
| 17 | extern int | ||
| 18 | dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | ||
| 19 | dma_addr_t device_addr, size_t size, int flags); | ||
| 20 | |||
| 21 | extern void | ||
| 22 | dma_release_declared_memory(struct device *dev); | ||
| 23 | |||
| 24 | extern void * | ||
| 25 | dma_mark_declared_memory_occupied(struct device *dev, | ||
| 26 | dma_addr_t device_addr, size_t size); | ||
| 27 | #else | ||
| 28 | #define dma_alloc_from_coherent(dev, size, handle, ret) (0) | ||
| 29 | #define dma_release_from_coherent(dev, order, vaddr) (0) | ||
| 30 | #endif | ||
| 31 | |||
| 32 | #endif | ||
