From 248d151cfcd0767d63bb6df5a3c23af85620d72f Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Wed, 28 Jan 2009 21:53:16 +0900 Subject: [PATCH] --- yaml --- r: 138905 b: refs/heads/master c: 97d9800de9df9c6e71b00c0a26239c7d7f6a46c4 h: refs/heads/master i: 138903: 56fce3b129740b9825767a147e616ae3a7e76643 v: v3 --- [refs] | 2 +- trunk/arch/ia64/kernel/pci-swiotlb.c | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 0b1d51d253a6..42edbcc61bff 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fb4467274de0c93e15c4a4fd3249d62454ba57dc +refs/heads/master: 97d9800de9df9c6e71b00c0a26239c7d7f6a46c4 diff --git a/trunk/arch/ia64/kernel/pci-swiotlb.c b/trunk/arch/ia64/kernel/pci-swiotlb.c index 717ad4f1c708..573f02c39a00 100644 --- a/trunk/arch/ia64/kernel/pci-swiotlb.c +++ b/trunk/arch/ia64/kernel/pci-swiotlb.c @@ -13,8 +13,16 @@ int swiotlb __read_mostly; EXPORT_SYMBOL(swiotlb); +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,