Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751119AbbEFKMQ (ORCPT ); Wed, 6 May 2015 06:12:16 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([207.82.80.143]:63670 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750808AbbEFKMM convert rfc822-to-8bit (ORCPT ); Wed, 6 May 2015 06:12:12 -0400 Message-ID: <5549E834.1040305@arm.com> Date: Wed, 06 May 2015 11:08:52 +0100 From: Robin Murphy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Suravee Suthikulpanit , "rjw@rjwysocki.net" , "lenb@kernel.org" , Catalin Marinas , Will Deacon , "thomas.lendacky@amd.com" , "herbert@gondor.apana.org.au" , "davem@davemloft.net" CC: "al.stone@linaro.org" , "arnd@arndb.de" , "linaro-acpi@lists.linaro.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-acpi@vger.kernel.org" , "leo.duran@amd.com" , "hanjun.guo@linaro.org" , "msalter@redhat.com" , "grant.likely@linaro.org" , "linux-arm-kernel@lists.infradead.org" , "linux-crypto@vger.kernel.org" Subject: Re: [V2 PATCH 2/5] arm64 : Introduce support for ACPI _CCA object References: <1430838729-21572-1-git-send-email-Suravee.Suthikulpanit@amd.com> <1430838729-21572-3-git-send-email-Suravee.Suthikulpanit@amd.com> In-Reply-To: <1430838729-21572-3-git-send-email-Suravee.Suthikulpanit@amd.com> X-OriginalArrivalTime: 06 May 2015 10:08:59.0224 (UTC) FILETIME=[AB6F5D80:01D087E4] X-MC-Unique: EnXBrEHoQaSXGkCfBfG4Pw-1 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1799 Lines: 56 Hi Suravee, On 05/05/15 16:12, Suravee Suthikulpanit wrote: > From http://www.uefi.org/sites/default/files/resources/ACPI_6.0.pdf, > section 6.2.17 _CCA states that ARM platforms require ACPI _CCA > object to be specified for DMA-cabpable devices. This patch introduces > ACPI_MUST_HAVE_CCA in arm64 Kconfig to specify such requirement. > > In this case of missing _CCA, arm64 would assign dummy_dma_ops > to disable DMA capability of the device. > > Signed-off-by: Mark Salter > Signed-off-by: Suravee Suthikulpanit > --- [...] > +static void __dummy_sync_single_for_cpu(struct device *dev, > + dma_addr_t dev_addr, size_t size, > + enum dma_data_direction dir) > +{ > +} > + > +static void __dummy_sync_single_for_device(struct device *dev, > + dma_addr_t dev_addr, size_t size, > + enum dma_data_direction dir) > +{ > +} Minor point, but I don't see the need to have multiple dummy functions with identical signatures - just have a generic dummy_sync_single and assign it to both ops. > +static void __dummy_sync_sg_for_cpu(struct device *dev, > + struct scatterlist *sgl, int nelems, > + enum dma_data_direction dir) > +{ > +} > + > +static void __dummy_sync_sg_for_device(struct device *dev, > + struct scatterlist *sgl, int nelems, > + enum dma_data_direction dir) > +{ > +} Ditto here with dummy_sync_sg. I wonder if there's any argument for putting the dummy DMA ops somewhere common, like drivers/base/dma-mapping.c? Robin. -- 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/