]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/ia64/kernel/pci-swiotlb.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm
[linux-2.6-omap-h63xx.git] / arch / ia64 / kernel / pci-swiotlb.c
index e6b2ec9b27dad7c62d5c9ae492f1ba6a21b5e2f5..573f02c39a00295adb4edbbb1a2666e9e1e33da7 100644 (file)
 int swiotlb __read_mostly;
 EXPORT_SYMBOL(swiotlb);
 
-/* Set this to 1 if there is a HW IOMMU in the system */
-int iommu_detected __read_mostly;
+static void *ia64_swiotlb_alloc_coherent(struct device *dev, size_t size,
+                                        dma_addr_t *dma_handle, gfp_t gfp)
+{
+       if (dev->coherent_dma_mask != DMA_64BIT_MASK)
+               gfp |= GFP_DMA;
+       return swiotlb_alloc_coherent(dev, size, dma_handle, gfp);
+}
 
 struct dma_map_ops swiotlb_dma_ops = {
-       .alloc_coherent = swiotlb_alloc_coherent,
+       .alloc_coherent = ia64_swiotlb_alloc_coherent,
        .free_coherent = swiotlb_free_coherent,
        .map_page = swiotlb_map_page,
        .unmap_page = swiotlb_unmap_page,
@@ -33,7 +38,7 @@ struct dma_map_ops swiotlb_dma_ops = {
        .mapping_error = swiotlb_dma_mapping_error,
 };
 
-void swiotlb_dma_init(void)
+void __init swiotlb_dma_init(void)
 {
        dma_ops = &swiotlb_dma_ops;
        swiotlb_init();