From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751945AbaCGETb (ORCPT ); Thu, 6 Mar 2014 23:19:31 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:54216 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751012AbaCGETa (ORCPT ); Thu, 6 Mar 2014 23:19:30 -0500 Message-ID: <531948A8.9040106@ti.com> Date: Fri, 7 Mar 2014 12:18:48 +0800 From: Santosh Shilimkar User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Rob Herring CC: Arnd Bergmann , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , Greg Kroah-Hartman , Russell King , Olof Johansson , Grant Likely , Rob Herring , Catalin Marinas , Linus Walleij Subject: Re: [PATCH 3/7] of: introduce of_dma_is_coherent() helper References: <1394097598-17622-1-git-send-email-santosh.shilimkar@ti.com> <1394097598-17622-4-git-send-email-santosh.shilimkar@ti.com> <53194092.7010809@ti.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 07 March 2014 11:55 AM, Rob Herring wrote: > On Thu, Mar 6, 2014 at 9:44 PM, Santosh Shilimkar > wrote: >> On Friday 07 March 2014 11:13 AM, Rob Herring wrote: >>> On Thu, Mar 6, 2014 at 3:19 AM, Santosh Shilimkar >>> wrote: >>>> The of_dma_is_coherent() helper parses the given DT device >>>> node to see if the "dma-coherent" property is supported and >>>> returns true or false accordingly. >>>> >>>> For the architectures which are fully dma coherent and don't need per device >>>> property, it can enable CONFIG_ARCH_IS_DMA_COHERENT config option which >>>> enables DMA coherent for all devices by default. >>> >>> This worries me. I killed off arch_is_coherent() for arm. Now we're >>> adding something back. Also, we already have HAVE_GENERIC_DMA_COHERENT >>> which is different, but the names will be confusing. MIPS also has >>> DMA_NONCOHERENT. >>> >> Thanks for comments Rob. I will address them in next version. >> Specifically about ARCH_IS_DMA_COHERENT, I wasn't very comfortable either >> while adding it. But as Arnd mentioned, there is a need to have a way >> for the arch's which are fully coherent to use coherent ops by default. >> >> Am not sure whats the best way to have such support without imposing >> any special updates on such arches. > > Thinking about this some more, if the arch is always coherent or > always non-coherent, then the default ops are always fine. In that > case set_arch_dma_coherent_ops is always a nop and of_dma_is_coherent > is a don't care. > Hmmm.. I guess you are right. In that case we can drop the need of config option. Regards, Santosh