From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.151]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e33.co.us.ibm.com", Issuer "Equifax" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id D660DB70B8 for ; Thu, 16 Sep 2010 04:06:47 +1000 (EST) Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e33.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id o8FI1fIs009303 for ; Wed, 15 Sep 2010 12:01:41 -0600 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o8FI6ao9060818 for ; Wed, 15 Sep 2010 12:06:37 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o8FI6ZJK017659 for ; Wed, 15 Sep 2010 12:06:36 -0600 From: Nishanth Aravamudan To: nacc@us.ibm.com Subject: [PATCH 14/15] ppc64 iommu: use coherent_dma_mask for alloc_coherent Date: Wed, 15 Sep 2010 11:05:57 -0700 Message-Id: <1284573958-8397-15-git-send-email-nacc@us.ibm.com> In-Reply-To: <1284573958-8397-1-git-send-email-nacc@us.ibm.com> References: <1284573958-8397-1-git-send-email-nacc@us.ibm.com> Cc: linuxppc-dev@lists.ozlabs.org, Paul Mackerras , Milton Miller List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , The IOMMU code has been passing the dma-mask instead of the coherent_dma_mask to the iommu allocator. Coherent allocations should be made using the coherent_dma_mask. Signed-off-by: Milton Miller Signed-off-by: Nishanth Aravamudan --- We currently don't check the mask other than to warn when its being set, so I don't think this is stable material. --- arch/powerpc/kernel/dma-iommu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c index 6e54a0f..e755415 100644 --- a/arch/powerpc/kernel/dma-iommu.c +++ b/arch/powerpc/kernel/dma-iommu.c @@ -19,7 +19,7 @@ static void *dma_iommu_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag) { return iommu_alloc_coherent(dev, get_iommu_table_base(dev), size, - dma_handle, device_to_mask(dev), flag, + dma_handle, dev->coherent_dma_mask, flag, dev_to_node(dev)); } -- 1.7.0.4