hw-breakpoints: Modify breakpoints without unregistering them
[safe/jmp/linux-2.6] / arch / ia64 / kernel / pci-swiotlb.c
index d21dea4..285aae8 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_BIT_MASK(64))
+               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,