Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751534AbbKJVEF (ORCPT ); Tue, 10 Nov 2015 16:04:05 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:51469 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750950AbbKJVEC (ORCPT ); Tue, 10 Nov 2015 16:04:02 -0500 Subject: Re: [PATCH V2 1/3] scsi: mptxsas: try 64 bit DMA when 32 bit DMA fails To: Arnd Bergmann References: <1447034266-28003-1-git-send-email-okaya@codeaurora.org> <4982446.ZlJVrezq1Y@wuerfel> <564222CB.3000701@codeaurora.org> <6333643.g8NiezT8gD@wuerfel> Cc: Sinan Kaya , linux-arm-kernel@lists.infradead.org, Abhijit Mahajan , Nagalakshmi Nandigama , linux-scsi@vger.kernel.org, jcm@redhat.com, "James E.J. Bottomley" , linux-kernel@vger.kernel.org, Sreekanth Reddy , Praveen Krishnamoorthy , cov@codeaurora.org, linux-arm-msm@vger.kernel.org, agross@codeaurora.org, MPT-FusionLinux.pdl@avagotech.com, Hannes Reinecke From: Timur Tabi Message-ID: <56425BBF.6000308@codeaurora.org> Date: Tue, 10 Nov 2015 15:03:59 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <6333643.g8NiezT8gD@wuerfel> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1319 Lines: 35 On 11/10/2015 01:13 PM, Arnd Bergmann wrote: > If the mask is 64-bit by default on ARM64, that is a bug that we need > to fix urgently. Can you verify this? I think the mask is 0 by default, because there's no code in ARM64 that actually sets the mask. Take a look at arch_setup_pdev_archdata() in arch/powerpc/kernel/setup-common.c. void arch_setup_pdev_archdata(struct platform_device *pdev) { pdev->archdata.dma_mask = DMA_BIT_MASK(32); pdev->dev.dma_mask = &pdev->archdata.dma_mask; set_dma_ops(&pdev->dev, &dma_direct_ops); } I don't see anything equivalent in arch/arm64 > A lot of PCI devices can only do 32-bit DMA, and we have plenty > of drivers that don't bother setting a mask at all because the 32-bit > mask is the default on all other architectures. In our drivers for 32-bit devices, we have to explicitly set the DMA mask to 32-bits in order to get any DMA working. -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/